From e4dc00fb4d6fb0e44c495dde7b19eb3ee7a6e7be Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Wed, 24 Dec 2025 16:53:59 -0800 Subject: [PATCH] fix(frontend): Increase songs list limit to 1000 --- backend/check_missing_videos.py | 52 +++++++++++++++++++++++++++++++++ frontend/app/songs/page.tsx | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 backend/check_missing_videos.py diff --git a/backend/check_missing_videos.py b/backend/check_missing_videos.py new file mode 100644 index 0000000..c7cd54c --- /dev/null +++ b/backend/check_missing_videos.py @@ -0,0 +1,52 @@ +import sys +from database import get_session +from models import Performance, Show, Song +from sqlmodel import select, col + +def check_videos(): + video_ids = [ + "PvdtMSifDqU", "7vujKUzGtcg", "nCnYJaIxBzo", "Yeno3bJs4Ws", + "zQI6-LloYwI", "F66jL0skeT4", "JdWnhOIWh-I", "wtTiAwA5Ha4", + "USQNba0t-4A", "vCdiwBSGtpk", "1BbtYhhCMWs", "yCPFRcIByqI", + "vE1F77CZbXQ", "rek58BRByTw", "rhP0-gKD_d8", "jMhayG6WCIw", + "osPxSR5GmX8", "cyLYgo9r3xM", "nZE_w8hDukI", "W93zvUz4vyI" + ] + + session = next(get_session()) + found_count = 0 + missing = [] + + print(f"Checking {len(video_ids)} videos...") + + for vid in video_ids: + # Check Shows + s = session.exec(select(Show).where(Show.youtube_link.contains(vid))).first() + if s: + print(f"[FOUND] {vid}: Show {s.date}") + found_count += 1 + continue + + # Check Performances + p = session.exec(select(Performance).where(Performance.youtube_link.contains(vid))).first() + if p: + # Get song title + song = session.get(Song, p.song_id) + print(f"[FOUND] {vid}: Performance {song.title} (Show {p.show_id})") + found_count += 1 + continue + + # Check Songs (Direct link) + song = session.exec(select(Song).where(Song.youtube_link.contains(vid))).first() + if song: + print(f"[FOUND] {vid}: Song Master {song.title}") + found_count += 1 + continue + + print(f"[MISSING] {vid}") + missing.append(vid) + + print(f"\nSummary: Found {found_count}/{len(video_ids)}") + print(f"Missing IDs: {missing}") + +if __name__ == "__main__": + check_videos() diff --git a/frontend/app/songs/page.tsx b/frontend/app/songs/page.tsx index 10097ce..7b68bad 100644 --- a/frontend/app/songs/page.tsx +++ b/frontend/app/songs/page.tsx @@ -18,7 +18,7 @@ export default function SongsPage() { const [loading, setLoading] = useState(true) useEffect(() => { - fetch(`${getApiUrl()}/songs/?limit=100`) + fetch(`${getApiUrl()}/songs/?limit=1000`) .then(res => res.json()) .then(data => { // Sort alphabetically