playlist edition

This commit is contained in:
Gabriel Radureau
2025-10-13 16:53:15 +02:00
parent 0fa5a30809
commit 65d63ec828
15 changed files with 550 additions and 137 deletions

View File

@@ -0,0 +1,15 @@
# playlists/playlist_views.py
import streamlit as st
from playlists import playlist_db
from models import Video
from views import show_video_thumbnail
def preview_playlist(playlist):
st.subheader(f"🎬 Aperçu de la playlist : {playlist.name}")
rows = playlist_db.get_videos_for_playlist(playlist)
videos = [Video(**row) for row in rows]
if not videos:
st.info("Aucune vidéo correspondante.")
return
for video in videos[:30]: # limiter pour performance
show_video_thumbnail(video)