Improve video recommendations by refining category filtering
Update VideoPage component to correctly filter videos related to "Geschichte des Liedes" by simplifying the conditional logic and adding console logs for debugging. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 890577b1-c154-40a4-a177-a0c6d55320c3 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/890577b1-c154-40a4-a177-a0c6d55320c3/DyHCx4q
This commit is contained in:
parent
23b20d5105
commit
ccc10bb5a7
@ -82,6 +82,8 @@ export default function VideoPage() {
|
||||
const allVideos = recommendedResponse?.videos || [];
|
||||
if (!currentVideo) return allVideos;
|
||||
|
||||
console.log('Filtering videos for:', currentVideo.title);
|
||||
|
||||
// Check if current video belongs to a specific category
|
||||
if (currentVideo.title.includes("FOLX STADL") || currentVideo.title.includes("FOLXSTADL")) {
|
||||
return allVideos.filter(video =>
|
||||
@ -99,14 +101,12 @@ export default function VideoPage() {
|
||||
);
|
||||
}
|
||||
|
||||
if (currentVideo.title.includes("Die Geschichte des Liedes") ||
|
||||
currentVideo.title.includes("Geschichte des Liedes") ||
|
||||
currentVideo.title.includes("GESCHICHTE DES LIEDES")) {
|
||||
return allVideos.filter(video =>
|
||||
video.title.includes("Die Geschichte des Liedes") ||
|
||||
video.title.includes("Geschichte des Liedes") ||
|
||||
video.title.includes("GESCHICHTE DES LIEDES")
|
||||
if (currentVideo.title.includes("Geschichte des Liedes")) {
|
||||
const filtered = allVideos.filter(video =>
|
||||
video.title.includes("Geschichte des Liedes")
|
||||
);
|
||||
console.log('Found Geschichte videos:', filtered.length);
|
||||
return filtered;
|
||||
}
|
||||
|
||||
// If not in any specific category, return all videos
|
||||
|
||||
Loading…
Reference in New Issue
Block a user