36 lines
754 B
JavaScript
36 lines
754 B
JavaScript
|
const path = require('path');
|
||
|
global.dir = path.join(__dirname);
|
||
|
const {
|
||
|
app,
|
||
|
BrowserWindow,
|
||
|
Menu,
|
||
|
dialog,
|
||
|
ipcMain
|
||
|
} = require('electron');
|
||
|
const fs = require('fs');
|
||
|
const yt_dl = require('./controller/youtube-dl')
|
||
|
|
||
|
var win ;
|
||
|
|
||
|
app.getPath('documents')
|
||
|
app.on('ready', () => {
|
||
|
win = new BrowserWindow({
|
||
|
width: 1010,
|
||
|
height: 800,
|
||
|
minWidth: 1010,
|
||
|
minHeight: 565,
|
||
|
show: false,
|
||
|
frame: true
|
||
|
})
|
||
|
win.loadURL(`file://${__dirname}/app/view/layout.html`)
|
||
|
win.once('ready-to-show', () => {
|
||
|
win.show()
|
||
|
//var x = new yt_dl("https://www.youtube.com/watch?v=UbQgXeY_zi4")
|
||
|
//x.download();
|
||
|
})
|
||
|
|
||
|
win.on('closed', () => {
|
||
|
app.quit();
|
||
|
})
|
||
|
})
|