diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index 6b5e53b..f125fbf 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -107,17 +107,27 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) { { title: "Geschichte des Liedes", videos: (() => { - // Filter videos for Geschichte des Liedes (exclude FOLX STADL and Gipfelstammtisch) + // Filter videos that specifically contain "Geschichte des Liedes" in title or description const gdlVideos = videos.filter(video => - !video.title.includes("FOLX STADL") && - !video.title.includes("FOLXSTADL") && - !video.title.includes("Gipfelstammtisch") + video.title.toLowerCase().includes("geschichte des liedes") || + video.description?.toLowerCase().includes("geschichte des liedes") ); - // Shuffle the videos randomly + // If no specific "Geschichte des Liedes" videos found, fallback to general filter + if (gdlVideos.length === 0) { + const fallbackVideos = videos.filter(video => + !video.title.includes("FOLX STADL") && + !video.title.includes("FOLXSTADL") && + !video.title.includes("Gipfelstammtisch") + ); + const shuffled = [...fallbackVideos].sort(() => Math.random() - 0.5); + return shuffled.slice(0, 10); + } + + // Shuffle the Geschichte des Liedes videos randomly const shuffled = [...gdlVideos].sort(() => Math.random() - 0.5); - // Return 10 random videos + // Return 10 random videos from the collection return shuffled.slice(0, 10); })() }