mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
started playlist downlaod messageBox
This commit is contained in:
@ -35,7 +35,7 @@ module.exports = (win, options, refreshMenu) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const playlist = await ytpl(playlistID,
|
const playlist = await ytpl(playlistID,
|
||||||
{ limit: options.playlistMaxItems || Infinity }
|
{ limit: options.playlistMaxItems || Infinity }
|
||||||
);
|
);
|
||||||
const playlistTitle = playlist.title;
|
const playlistTitle = playlist.title;
|
||||||
@ -59,6 +59,14 @@ module.exports = (win, options, refreshMenu) => {
|
|||||||
downloadLabel = `Downloading "${playlistTitle}"`;
|
downloadLabel = `Downloading "${playlistTitle}"`;
|
||||||
refreshMenu();
|
refreshMenu();
|
||||||
|
|
||||||
|
dialog.showMessageBox({
|
||||||
|
type: "info",
|
||||||
|
buttons: ["OK"],
|
||||||
|
title: "Started Download",
|
||||||
|
message: `Downloading Playlist "${playlistTitle}"`,
|
||||||
|
detail: `(${playlist.items.length} songs)`,
|
||||||
|
});
|
||||||
|
|
||||||
if (is.dev()) {
|
if (is.dev()) {
|
||||||
console.log(
|
console.log(
|
||||||
`Downloading playlist "${playlistTitle}" (${playlist.items.length} songs)`
|
`Downloading playlist "${playlistTitle}" (${playlist.items.length} songs)`
|
||||||
@ -68,7 +76,7 @@ module.exports = (win, options, refreshMenu) => {
|
|||||||
playlist.items.forEach((song) => {
|
playlist.items.forEach((song) => {
|
||||||
win.webContents.send(
|
win.webContents.send(
|
||||||
"downloader-download-playlist",
|
"downloader-download-playlist",
|
||||||
song,
|
song.url,
|
||||||
playlistTitle,
|
playlistTitle,
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|||||||
@ -183,12 +183,12 @@ module.exports = {
|
|||||||
|
|
||||||
ipcRenderer.on(
|
ipcRenderer.on(
|
||||||
"downloader-download-playlist",
|
"downloader-download-playlist",
|
||||||
(_, songMetadata, playlistFolder, options) => {
|
(_, url, playlistFolder, options) => {
|
||||||
const reinit = () =>
|
const reinit = () =>
|
||||||
ipcRenderer.send("downloader-feedback", defaultMenuDownloadLabel);
|
ipcRenderer.send("downloader-feedback", defaultMenuDownloadLabel);
|
||||||
|
|
||||||
downloadVideoToMP3(
|
downloadVideoToMP3(
|
||||||
songMetadata.url,
|
url,
|
||||||
(feedback) => {
|
(feedback) => {
|
||||||
ipcRenderer.send("downloader-feedback", feedback);
|
ipcRenderer.send("downloader-feedback", feedback);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user