mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 11:21:46 +00:00
update electron & remote module
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
const electron = require("electron");
|
||||
//const remote = require('@electron/remote');
|
||||
|
||||
module.exports.getFolder = (customFolder) =>
|
||||
customFolder || (electron.app || electron.remote.app).getPath("downloads");
|
||||
customFolder || electron.app.getPath("downloads");
|
||||
module.exports.defaultMenuDownloadLabel = "Download playlist";
|
||||
|
||||
const orderedQualityList = ["maxresdefault", "hqdefault", "mqdefault", "sdddefault"];
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
const { remote, ipcRenderer } = require("electron");
|
||||
const { ipcRenderer } = require("electron");
|
||||
const { Menu } = require("@electron/remote");
|
||||
|
||||
|
||||
const customTitlebar = require("custom-electron-titlebar");
|
||||
function $(selector) { return document.querySelector(selector); }
|
||||
@ -12,7 +14,7 @@ module.exports = () => {
|
||||
document.title = "Youtube Music";
|
||||
|
||||
ipcRenderer.on("updateMenu", function (_event, showMenu) {
|
||||
bar.updateMenu(showMenu ? remote.Menu.getApplicationMenu() : null);
|
||||
bar.updateMenu(showMenu ? Menu.getApplicationMenu() : null);
|
||||
});
|
||||
|
||||
// Increases the right margin of Navbar background when the scrollbar is visible to avoid blocking it (z-index doesn't affect it)
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
const { ipcRenderer, remote } = require("electron");
|
||||
const { ipcRenderer } = require("electron");
|
||||
const { globalShortcut } = require('@electron/remote');
|
||||
|
||||
const { setOptions } = require("../../config/plugins");
|
||||
|
||||
@ -202,10 +203,10 @@ function setTooltip(volume) {
|
||||
|
||||
function setupGlobalShortcuts(options) {
|
||||
if (options.globalShortcuts.volumeUp) {
|
||||
remote.globalShortcut.register((options.globalShortcuts.volumeUp), () => changeVolume(true, options));
|
||||
globalShortcut.register((options.globalShortcuts.volumeUp), () => changeVolume(true, options));
|
||||
}
|
||||
if (options.globalShortcuts.volumeDown) {
|
||||
remote.globalShortcut.register((options.globalShortcuts.volumeDown), () => changeVolume(false, options));
|
||||
globalShortcut.register((options.globalShortcuts.volumeDown), () => changeVolume(false, options));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
const { ElementFromFile, templatePath } = require("../utils");
|
||||
const dialog = require('electron').remote.dialog
|
||||
const { dialog } = require('@electron/remote');
|
||||
|
||||
function $(selector) { return document.querySelector(selector); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user