fix(youtube): request video content details

This commit is contained in:
2026-08-02 16:59:02 +07:00 Unverified
parent e8e52daf95
commit 974a38cdf3
+1 -1
View File
@@ -52,7 +52,7 @@ export async function getLatestYoutubeVideos(): Promise<LatestVideo[]> {
channelData.items?.[0]?.contentDetails?.relatedPlaylists?.uploads;
if (!playlistId) return [];
const response = await fetch(
`https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=${encodeURIComponent(playlistId)}&maxResults=10&key=${encodeURIComponent(apiKey)}`,
`https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,contentDetails&playlistId=${encodeURIComponent(playlistId)}&maxResults=10&key=${encodeURIComponent(apiKey)}`,
{ cache: "no-store" },
);
if (!response.ok) throw new Error("YouTube video list failed.");