playlist edition
This commit is contained in:
15
app/playlists/playlist_views.py
Normal file
15
app/playlists/playlist_views.py
Normal 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)
|
||||
Reference in New Issue
Block a user