diff --git a/backend/api/routes.py b/backend/api/routes.py index 22f55a9..dc1c811 100644 --- a/backend/api/routes.py +++ b/backend/api/routes.py @@ -317,14 +317,18 @@ async def get_playlist(id: str): # Safely extract album album_name = extract_album_name(track, playlist_data.get('title', 'Single')) + video_id = track.get('videoId') + if not video_id: + continue + formatted_tracks.append({ "title": track.get('title', 'Unknown Title'), "artist": artist_names, "album": album_name, "duration": track.get('duration_seconds', track.get('length_seconds', 0)), "cover_url": cover_url, - "id": track.get('videoId'), - "url": f"https://music.youtube.com/watch?v={track.get('videoId')}" + "id": video_id, + "url": f"https://music.youtube.com/watch?v={video_id}" }) # Get Playlist Cover (usually highest res) diff --git a/frontend/app/playlist/page.tsx b/frontend/app/playlist/page.tsx index 18958e7..a73c925 100644 --- a/frontend/app/playlist/page.tsx +++ b/frontend/app/playlist/page.tsx @@ -1,5 +1,7 @@ "use client"; +import Link from 'next/link'; +import Image from 'next/image'; import { usePlayer } from "@/context/PlayerContext"; import { Play, Pause, Clock, Heart, MoreHorizontal, Plus } from "lucide-react"; import { useEffect, useState, Suspense } from "react"; @@ -127,7 +129,16 @@ function PlaylistContent() {
Album • {album.creator || 'Spotify'}
diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index a2c7c4e..1834fd6 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -36,6 +36,14 @@ const nextConfig = { protocol: 'https', hostname: 'lh3.googleusercontent.com', }, + { + protocol: 'https', + hostname: 'yt3.googleusercontent.com', + }, + { + protocol: 'https', + hostname: 'yt3.ggpht.com', + }, { protocol: 'https', hostname: 'placehold.co',