mirror of
https://github.com/jely2002/youtube-dl-gui.git
synced 2021-11-01 22:46:21 +03:00
feat: add download & add video shortcuts (#101)
This commit is contained in:
12
main.js
12
main.js
@@ -1,4 +1,4 @@
|
||||
const { app, BrowserWindow, ipcMain, dialog, Menu, shell, clipboard } = require('electron');
|
||||
const { app, BrowserWindow, ipcMain, dialog, Menu, shell, clipboard, globalShortcut } = require('electron');
|
||||
const Environment = require('./modules/Environment');
|
||||
const path = require('path');
|
||||
const QueryManager = require("./modules/QueryManager");
|
||||
@@ -64,7 +64,15 @@ function startCriticalHandlers(env) {
|
||||
if(appStarting) {
|
||||
appStarting = false;
|
||||
|
||||
//
|
||||
globalShortcut.register('Shift+CommandOrControl+V', async () => {
|
||||
win.webContents.send("addShortcut", clipboard.readText());
|
||||
});
|
||||
|
||||
globalShortcut.register('Shift+CommandOrControl+D', async () => {
|
||||
win.webContents.send("downloadShortcut");
|
||||
});
|
||||
|
||||
// Restore the videos from last session
|
||||
ipcMain.handle("restoreTaskList", () => {
|
||||
taskList.restore()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user