custom metadata on playlist-download

This commit is contained in:
Araxeus
2021-05-06 03:02:06 +03:00
parent d96fefbc24
commit 61c5494588
2 changed files with 5 additions and 3 deletions

View File

@ -35,7 +35,9 @@ module.exports = (win, options, refreshMenu) => {
return; return;
} }
const playlist = await ytpl(playlistID, { limit: Infinity }); const playlist = await ytpl(playlistID,
{ limit: options.playlistMaxItems || Infinity }
);
const playlistTitle = playlist.title; const playlistTitle = playlist.title;
const folder = getFolder(options.downloadFolder); const folder = getFolder(options.downloadFolder);
@ -63,7 +65,7 @@ module.exports = (win, options, refreshMenu) => {
); );
} }
playlist.items.slice(0, options.playlistMaxItems).forEach((song) => { playlist.items.forEach((song) => {
win.webContents.send( win.webContents.send(
"downloader-download-playlist", "downloader-download-playlist",
song, song,

View File

@ -198,7 +198,7 @@ ipcRenderer.on(
}, },
reinit, reinit,
options, options,
songMetadata, null,
playlistFolder playlistFolder
); );
} }