diff --git a/attached_assets/image_1756898012472.png b/attached_assets/image_1756898012472.png new file mode 100644 index 0000000..f5c6e62 Binary files /dev/null and b/attached_assets/image_1756898012472.png differ diff --git a/client/src/pages/VideoPage.tsx b/client/src/pages/VideoPage.tsx index 63d74fc..c106dcb 100644 --- a/client/src/pages/VideoPage.tsx +++ b/client/src/pages/VideoPage.tsx @@ -76,7 +76,7 @@ export default function VideoPage() { enabled: !!videoId, }); - const recommendedVideos = recommendedResponse?.videos?.filter(v => v.id !== videoId) || []; + const recommendedVideos = recommendedResponse?.videos?.filter(v => v.id !== currentVideo?.id) || []; // Filter videos based on current video category for navigation const getFilteredVideosForNavigation = () => { @@ -85,25 +85,27 @@ export default function VideoPage() { // Check if current video belongs to a specific category - if (currentVideo.title.includes("FOLX STADL") || currentVideo.title.includes("FOLXSTADL")) { + const videoTitle = currentVideo.title || ''; + + if (videoTitle.includes("FOLX STADL") || videoTitle.includes("FOLXSTADL")) { return allVideos.filter(video => - video.title.includes("FOLX STADL") || video.title.includes("FOLXSTADL") + video.title?.includes("FOLX STADL") || video.title?.includes("FOLXSTADL") ); } - if (currentVideo.title.includes("Gipfelstammtisch") || - currentVideo.title.includes("GIPFELSTAMMTISCH") || - currentVideo.title.includes("Gipfel Stammtisch")) { + if (videoTitle.includes("Gipfelstammtisch") || + videoTitle.includes("GIPFELSTAMMTISCH") || + videoTitle.includes("Gipfel Stammtisch")) { return allVideos.filter(video => - video.title.includes("Gipfelstammtisch") || - video.title.includes("GIPFELSTAMMTISCH") || - video.title.includes("Gipfel Stammtisch") + video.title?.includes("Gipfelstammtisch") || + video.title?.includes("GIPFELSTAMMTISCH") || + video.title?.includes("Gipfel Stammtisch") ); } - if (currentVideo.title.includes("Geschichte des Liedes")) { + if (videoTitle.includes("Geschichte des Liedes")) { const filtered = allVideos.filter(video => - video.title.includes("Geschichte des Liedes") + video.title?.includes("Geschichte des Liedes") ); return filtered; }