feat: add download & add video shortcuts (#101)

This commit is contained in:
Jelle Glebbeek
2021-07-03 21:42:27 +02:00
parent 77d59f0e08
commit 67afddc995
3 changed files with 25 additions and 7 deletions

12
main.js
View File

@@ -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()
});