16 lines
529 B
Python
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)
|