aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2021-08-15 15:03:05 -0400
committerAndrew Lee <alee14498@protonmail.com>2021-08-15 15:03:05 -0400
commit5fcb2c40b38cde03044532ebe0e42e6d21fa10c7 (patch)
treeaf4a7c5b3aa437b4c525198bfb5ffe158265678b
parentdd26992095268bb15aa864d19185aaa1252dafb4 (diff)
downloadYouTube-TV-Client-5fcb2c40b38cde03044532ebe0e42e6d21fa10c7.tar.gz
YouTube-TV-Client-5fcb2c40b38cde03044532ebe0e42e6d21fa10c7.tar.bz2
YouTube-TV-Client-5fcb2c40b38cde03044532ebe0e42e6d21fa10c7.zip
updated package
-rw-r--r--index.js25
-rw-r--r--package.json8
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 <alee14498@protonmail.com'>",
"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}"
}
}