add download feedback and progress

This commit is contained in:
Araxeus
2023-03-04 11:57:56 +02:00
parent 54d3f925e6
commit 099e5d8491
7 changed files with 199 additions and 254 deletions

View File

@ -4,6 +4,10 @@ const is = require('electron-is');
module.exports.getFolder = customFolder => customFolder || app.getPath("downloads");
module.exports.defaultMenuDownloadLabel = "Download playlist";
module.exports.sendFeedback = (win, message) => {
win.webContents.send("downloader-feedback", message);
};
const orderedQualityList = ["maxresdefault", "hqdefault", "mqdefault", "sdddefault"];
module.exports.urlToJPG = (imgUrl, videoId) => {
if (!imgUrl || imgUrl.includes(".jpg")) return imgUrl;