Improve how specific video series are displayed and organized

Update the filtering and sorting logic for "FOLX STADL" and rename/refactor "VOLKSMUSIK" and "SCHLAGER & POP" sections to "GIPFELSTAMMTISCH" and "DIE GESCHICHTE DES LIEDES" respectively, while also refining the filtering criteria for these new sections.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 636b67ca-6f18-4eb7-b992-168c6c8b7078
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/60d372ff-2c10-46c7-b01b-10c3435136b0/636b67ca-6f18-4eb7-b992-168c6c8b7078/mNYBZ5G
This commit is contained in:
sebastjanartic 2025-09-06 20:10:04 +00:00
parent 5f4b0336ab
commit e79d81e05b

View File

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