diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index cfeee0e..d4c1523 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -49,14 +49,15 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) { new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime() ); - // FOLX STADL videos - updated patterns to catch more variations + // FOLX STADL videos - match the actual show format const folxStadlVideos = videos.filter(video => { const title = video.title.toLowerCase(); - return title.includes("folx stadl") || - title.includes("folxstadl") || - title.includes("folx-stadl") || - title.includes("volx stadl") || - title.includes("folx_stadl"); + return title.includes("folx stadl s4") || + title.includes("folx stadl s3") || + title.includes("folx stadl s2") || + title.includes("folx stadl s1") || + title.includes("folx stadl") || + title.includes("folxstadl"); }); return [ @@ -67,13 +68,14 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) { { title: "FOLX STADL", videos: (() => { - // If no specific FOLX STADL videos found, show some recent videos as placeholder - if (folxStadlVideos.length === 0) { - return sortedByDate.slice(0, 10); - } - // Shuffle FOLX STADL videos randomly - const shuffled = [...folxStadlVideos].sort(() => Math.random() - 0.5); - return shuffled.slice(0, 10); + // Show FOLX STADL episodes in order (newest first) + const sortedFolxStadl = [...folxStadlVideos].sort((a, b) => { + // Extract episode numbers for proper sorting + const aEp = parseInt(a.title.match(/\d+/)?.[0] || '0'); + const bEp = parseInt(b.title.match(/\d+/)?.[0] || '0'); + return bEp - aEp; // Newest episodes first + }); + return sortedFolxStadl.slice(0, 10); })() }, { @@ -107,49 +109,33 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) { })() }, { - title: "VOLKSMUSIK", + title: "GIPFELSTAMMTISCH", videos: (() => { - // Filter videos by popular Volksmusik artists - const volksmusikVideos = videos.filter(video => { + // Filter actual Gipfelstammtisch show episodes + const gipfelVideos = videos.filter(video => { const title = video.title.toLowerCase(); - return title.includes("die alpentaler") || - title.includes("die ladiner") || - title.includes("kastelruther spatzen") || - title.includes("zillertaler") || - title.includes("ursprung buam") || - title.includes("tiroler") || - title.includes("kärntner") || - title.includes("steirer"); + return title.includes("gipfelstammtisch") && + !title.includes("folx stadl"); // Exclude if it's part of Folx Stadl }); - // If no specific volksmusik videos found, use fallback - if (volksmusikVideos.length === 0) { - return sortedByDate.slice(10, 20); - } - - const shuffled = [...volksmusikVideos].sort(() => Math.random() - 0.5); + // Shuffle the Gipfelstammtisch videos + const shuffled = [...gipfelVideos].sort(() => Math.random() - 0.5); return shuffled.slice(0, 10); })() }, { - title: "SCHLAGER & POP", + title: "DIE GESCHICHTE DES LIEDES", videos: (() => { - // Filter videos that might be schlager or pop - const schlagerVideos = videos.filter(video => { + // Filter actual "Die Geschichte des Liedes" episodes + const gdlVideos = videos.filter(video => { const title = video.title.toLowerCase(); - return title.includes("band") || - title.includes("duo") || - title.includes("sänger") || - title.includes("musik") || - title.includes("hit"); + return title.includes("die geschichte des liedes") && + !title.includes("folx stadl") && + !title.includes("gipfelstammtisch"); }); - // If no specific schlager videos found, show different range - if (schlagerVideos.length === 0) { - return sortedByDate.slice(20, 30); - } - - const shuffled = [...schlagerVideos].sort(() => Math.random() - 0.5); + // Shuffle the Geschichte des Liedes videos + const shuffled = [...gdlVideos].sort(() => Math.random() - 0.5); return shuffled.slice(0, 10); })() },