From 5fcb2c40b38cde03044532ebe0e42e6d21fa10c7 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 15 Aug 2021 15:03:05 -0400 Subject: updated package --- index.js | 25 +++++++++++++++---------- package.json | 8 ++++++-- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index 9b43b3b..c2eeed5 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,12 @@ function cookieDump(cookies) { } app.whenReady().then(() => { - createWindow() + console.log("Started YouTube TV Client 2.0"); + createWindow(); + + session.defaultSession.cookies.get({ + url: 'https://youtube.com/tv' + }); session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => { details.requestHeaders['User-Agent'] = 'Mozilla/5.0 (Linux; Tizen 2.3) AppleWebKit/538.1 (KHTML, like Gecko)Version/2.3 TV Safari/538.1'; @@ -33,22 +38,22 @@ app.whenReady().then(() => { }); app.on('activate', function () { - if (BrowserWindow.getAllWindows().length === 0) createWindow() - }) + if (BrowserWindow.getAllWindows().length === 0) createWindow(); + }); - }) + }); app.on('window-all-closed', function () { - if (process.platform !== 'darwin') app.quit() + if (process.platform !== 'darwin') app.quit(); session.defaultSession.cookies.get({ url: 'https://youtube.com/tv' }) .then((cookies) => { - cookieDump(cookies) - console.log("Wrote Cookies") + cookieDump(cookies); + console.log("Wrote Cookies"); }).catch((error) => { - console.log(error) - }) + console.log(error); + }); -}) \ No newline at end of file +}); \ No newline at end of file diff --git a/package.json b/package.json index c1f4b75..a99cc43 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,17 @@ "main": "index.js", "author": "Andrew Lee ", "license": "GPL-3.0", - "dependencies": {}, "scripts": { "start": "electron .", - "build": "electron-builder -wl" + "build": "electron-builder --linux --win=portable --mac=zip" }, "devDependencies": { "electron": "^13.1.9", "electron-builder": "^22.11.7" + }, + "build": { + "appId": "me.alee14.ytvclient", + "productName": "YouTube TV Client", + "copyright": "© Copyright 2017-2021, ${author}" } } -- cgit v1.2.3