set badge on downloader playlist

This commit is contained in:
Araxeus
2022-01-12 14:29:56 +02:00
parent ec4c2e92af
commit 17a24cbb04
2 changed files with 16 additions and 7 deletions

View File

@ -1,4 +1,5 @@
const electron = require("electron");
const is = require('electron-is');
module.exports.getFolder = customFolder => customFolder || electron.app.getPath("downloads");
module.exports.defaultMenuDownloadLabel = "Download playlist";
@ -37,3 +38,9 @@ module.exports.presets = {
ffmpegArgs: ["-acodec", "libopus"],
},
};
module.exports.setBadge = num => {
if (is.linux() || is.macOS()) {
electron.app.badgeCount = num;
}
}