fix(frontend): Increase songs list limit to 1000
Some checks are pending
Deploy Elmeg / deploy (push) Waiting to run

This commit is contained in:
fullsizemalt 2025-12-24 16:53:59 -08:00
parent d7acbebc9c
commit e4dc00fb4d
2 changed files with 53 additions and 1 deletions

View file

@ -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()

View file

@ -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