Organize videos into shows and pure video content categories
Separate videos into "ODDAJE" (shows/episodes) and pure video content, refining the filtering logic in the NetflixGrid component. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1/DVlzRoR
This commit is contained in:
parent
fcb28e8c74
commit
d657fc0b03
@ -76,14 +76,17 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) {
|
||||
video.description?.toLowerCase().includes("geschichte des liedes video")
|
||||
);
|
||||
|
||||
// If no specific "Geschichte des Liedes VIDEO" videos found, fallback to general filter
|
||||
// If no specific "Geschichte des Liedes VIDEO" videos found, use ONLY pure video content (not shows)
|
||||
if (videoVideos.length === 0) {
|
||||
const fallbackVideos = videos.filter(video =>
|
||||
const pureVideos = videos.filter(video =>
|
||||
!video.title.includes("FOLX STADL") &&
|
||||
!video.title.includes("FOLXSTADL") &&
|
||||
!video.title.includes("Gipfelstammtisch")
|
||||
!video.title.includes("Gipfelstammtisch") &&
|
||||
!video.title.toLowerCase().includes("oddaja") &&
|
||||
!video.title.toLowerCase().includes("sendung") &&
|
||||
!video.title.toLowerCase().includes("episode")
|
||||
);
|
||||
const shuffled = [...fallbackVideos].sort(() => Math.random() - 0.5);
|
||||
const shuffled = [...pureVideos].sort(() => Math.random() - 0.5);
|
||||
return shuffled.slice(0, 10);
|
||||
}
|
||||
|
||||
@ -94,6 +97,24 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) {
|
||||
return shuffled.slice(0, 10);
|
||||
})()
|
||||
},
|
||||
{
|
||||
title: "ODDAJE",
|
||||
videos: (() => {
|
||||
// Filter content that are specifically shows/episodes
|
||||
const showVideos = videos.filter(video =>
|
||||
video.title.toLowerCase().includes("oddaja") ||
|
||||
video.title.toLowerCase().includes("sendung") ||
|
||||
video.title.toLowerCase().includes("episode") ||
|
||||
video.title.includes("Gipfelstammtisch")
|
||||
);
|
||||
|
||||
// Shuffle the show videos randomly
|
||||
const shuffled = [...showVideos].sort(() => Math.random() - 0.5);
|
||||
|
||||
// Return 10 random videos from the ODDAJE collection
|
||||
return shuffled.slice(0, 10);
|
||||
})()
|
||||
},
|
||||
{
|
||||
title: "DIE Geschichte des Liedes",
|
||||
videos: (() => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user