Files
DanceVideos/app/playlists/playlist_views.py
Gabriel Radureau 65d63ec828 playlist edition
2025-10-13 16:53:15 +02:00

16 lines
529 B
Python

# 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)