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()
);
// 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);
})()
},