diff --git a/plugins/downloader/menu.js b/plugins/downloader/menu.js index f5b99d73..9822c8ed 100644 --- a/plugins/downloader/menu.js +++ b/plugins/downloader/menu.js @@ -36,10 +36,16 @@ module.exports = (win, options) => { return; } - console.log("trying to get playlist ID" +playlistID); - const playlist = await ytpl(playlistID, - { limit: options.playlistMaxItems || Infinity } - ); + console.log(`trying to get playlist ID: '${playlistID}'`); + let playlist; + try { + playlist = await ytpl(playlistID, { + limit: options.playlistMaxItems || Infinity, + }); + } catch (e) { + sendError(win, e); + return; + } const playlistTitle = playlist.title; const folder = getFolder(options.downloadFolder);