Update video categories and add fallback content for missing sections

Modify the video grid component to rename "GIPFELSTAMMTISCH" to "VOLKSMUSIK" and update filtering logic for "DIE Geschichte des Liedes" to "SCHLAGER & POP". Includes fallback mechanisms for empty category video lists.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 636b67ca-6f18-4eb7-b992-168c6c8b7078
Replit-Commit-Checkpoint-Type: intermediate_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:03:59 +00:00
parent d27df48d11
commit ce6f34751a

View File

@ -64,14 +64,18 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) {
title: "Meist Angesehen",
videos: sortedByViews.slice(0, 10)
},
...(folxStadlVideos.length > 0 ? [{
{
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);
})()
}] : []),
},
{
title: "VIDEO",
videos: (() => {
@ -103,54 +107,55 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) {
})()
},
{
title: "GIPFELSTAMMTISCH",
title: "VOLKSMUSIK",
videos: (() => {
// Filter videos that contain "Gipfelstammtisch" in various forms
const gipfelVideos = videos.filter(video => {
// Filter videos by popular Volksmusik artists
const volksmusikVideos = videos.filter(video => {
const title = video.title.toLowerCase();
return title.includes("gipfelstammtisch") ||
title.includes("gipfel stammtisch") ||
title.includes("gipfel-stammtisch");
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");
});
// Shuffle the Gipfelstammtisch videos randomly
const shuffled = [...gipfelVideos].sort(() => Math.random() - 0.5);
// If no specific volksmusik videos found, use fallback
if (volksmusikVideos.length === 0) {
return sortedByDate.slice(10, 20);
}
// Return 10 random videos from the GIPFELSTAMMTISCH collection
const shuffled = [...volksmusikVideos].sort(() => Math.random() - 0.5);
return shuffled.slice(0, 10);
})()
},
{
title: "DIE Geschichte des Liedes",
title: "SCHLAGER & POP",
videos: (() => {
// Filter videos that contain "Geschichte des Liedes" in various forms
const gdlVideos = videos.filter(video => {
// Filter videos that might be schlager or pop
const schlagerVideos = videos.filter(video => {
const title = video.title.toLowerCase();
const desc = video.description?.toLowerCase() || "";
return title.includes("geschichte des liedes") ||
title.includes("gschichte des liedes") ||
title.includes("die geschichte des liedes") ||
desc.includes("geschichte des liedes") ||
desc.includes("gschichte des liedes");
return title.includes("band") ||
title.includes("duo") ||
title.includes("sänger") ||
title.includes("musik") ||
title.includes("hit");
});
// 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);
// If no specific schlager videos found, show different range
if (schlagerVideos.length === 0) {
return sortedByDate.slice(20, 30);
}
// Shuffle the Geschichte des Liedes videos randomly
const shuffled = [...gdlVideos].sort(() => Math.random() - 0.5);
// Return 10 random videos from the collection
const shuffled = [...schlagerVideos].sort(() => Math.random() - 0.5);
return shuffled.slice(0, 10);
})()
},
{
title: "NEUE VIDEOS",
videos: sortedByDate.slice(0, 10)
}
];
}, [videos]);