mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 20:01:47 +00:00
fix(downloader): fix #2234
This commit is contained in:
@ -590,20 +590,17 @@ export async function downloadPlaylist(givenUrl?: string | URL) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (!playlist || !playlist.items || playlist.items.length === 0) {
|
||||||
!playlist ||
|
|
||||||
!playlist.items ||
|
|
||||||
playlist.items.length === 0 ||
|
|
||||||
!playlist.header ||
|
|
||||||
!('title' in playlist.header)
|
|
||||||
) {
|
|
||||||
sendError(
|
sendError(
|
||||||
new Error(t('plugins.downloader.backend.feedback.playlist-is-empty')),
|
new Error(t('plugins.downloader.backend.feedback.playlist-is-empty')),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const normalPlaylistTitle = playlist.header?.title?.text;
|
const normalPlaylistTitle =
|
||||||
|
playlist.header && 'title' in playlist.header
|
||||||
|
? playlist.header?.title?.text
|
||||||
|
: undefined;
|
||||||
const playlistTitle =
|
const playlistTitle =
|
||||||
normalPlaylistTitle ??
|
normalPlaylistTitle ??
|
||||||
playlist.page.contents_memo
|
playlist.page.contents_memo
|
||||||
|
|||||||
Reference in New Issue
Block a user