Compare commits

...

27 Commits

Author SHA1 Message Date
TC
1b54b19f3f Add "build:linux" script 2020-12-02 22:22:05 +01:00
TC
be7e6e431f Bump version to 1.6.5 2020-12-02 22:14:43 +01:00
6e42b097f8 Merge pull request #77 from th-ch/disable-hardware-acceleration
Add option to disable hardware acceleration
2020-12-02 22:12:42 +01:00
TC
ef9cd8cd24 Add option to disable hardware acceleration 2020-12-02 22:07:15 +01:00
8f3e165917 Merge pull request #76 from th-ch/downloader-plugin-retry-and-upgrade-dep
Downloader plugin - retry and upgrade dependencies
2020-12-02 21:41:04 +01:00
TC
33a11efe9a Update ytdl-core to 4.1.1 2020-12-02 21:16:39 +01:00
TC
9a97436cd8 Allow up to 3 retries in downloader 2020-12-02 21:16:12 +01:00
f7935c0024 Merge pull request #70 from hbarsaiyan/master
Reflect Arch Linux package name change
2020-11-29 21:17:02 +01:00
2b33d4e857 Reflect Arch Linux package name change
Package name has been changed to youtube-music-bin.
2020-11-29 23:57:07 +05:30
ed16c35a57 Merge pull request #67 from th-ch/hide-menu
Option to hide menu
2020-11-28 18:45:53 +01:00
TC
ae5b85d8d7 Autoupdate modal: add download/disable updates buttons 2020-11-28 18:13:41 +01:00
47b4414eb3 Merge pull request #68 from hbarsaiyan/master
Add Arch Linux installation instructions
2020-11-28 11:09:07 +01:00
e329bb2201 Add Arch Linux installation instructions 2020-11-28 15:22:34 +05:30
TC
155ef9e5f5 Bump version 2020-11-27 21:39:33 +01:00
TC
4bac3ace18 Option to hide menu (win/linux) 2020-11-27 21:39:15 +01:00
1d2b53f6ee Merge pull request #64 from th-ch/ci
Improve CI
2020-11-24 00:32:07 +01:00
TC
0fd49330d3 CI: cache yarn directory 2020-11-24 00:13:01 +01:00
TC
4b0e79345f Fail fast (Can only re-run all jobs, not just one) 2020-11-24 00:13:01 +01:00
0c819e9aa9 Merge pull request #63 from th-ch/menu-visible
Ensure menu is visible on all platforms
2020-11-23 23:41:07 +01:00
20d591c554 Merge pull request #62 from th-ch/snyk-upgrade-407335ffa685010c89f68cbb1a8b27a6
[Snyk] Upgrade @cliqz/adblocker-electron from 1.18.3 to 1.18.4
2020-11-23 23:29:04 +01:00
TC
002469a98d Bump adblocker 2020-11-23 23:16:54 +01:00
TC
3bc8430201 No CI run on pull_request (already on every push) 2020-11-23 23:11:44 +01:00
TC
db447a5d62 Bump patch version 2020-11-23 23:04:16 +01:00
TC
72527d0522 Disable autoHideMenuBar (so menu bar is always visible) 2020-11-23 22:59:48 +01:00
TC
cf4827d780 Run CI on every push/PR 2020-11-23 22:55:20 +01:00
TC
9b02591767 Test that menu bar is visible 2020-11-23 22:52:00 +01:00
2b243f6dcb fix: upgrade @cliqz/adblocker-electron from 1.18.3 to 1.18.4
Snyk has created this PR to upgrade @cliqz/adblocker-electron from 1.18.3 to 1.18.4.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/th-ch/project/81809c53-bb7b-46b9-a0d7-806d45d74ac6?utm_source=github&utm_medium=upgrade-pr
2020-11-23 02:19:19 +00:00
9 changed files with 125 additions and 64 deletions

View File

@ -1,19 +1,14 @@
name: Build YouTube Music
on:
push:
branches:
- master
pull_request:
branches:
- master
- push
jobs:
build:
name: Build YouTube Music
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
fail-fast: true
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
@ -25,6 +20,18 @@ jobs:
with:
node-version: "12.x"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --frozen-lockfile

View File

@ -8,9 +8,12 @@ const { autoUpdater } = require("electron-updater");
const { setApplicationMenu } = require("./menu");
const {
autoUpdate,
disableHardwareAcceleration,
getEnabledPlugins,
hideMenu,
isAppVisible,
isTrayEnabled,
setOptions,
store,
startAtLogin,
} = require("./store");
@ -25,6 +28,12 @@ app.commandLine.appendSwitch(
"--experimental-wasm-threads --experimental-wasm-bulk-memory"
);
app.allowRendererProcessReuse = true; // https://github.com/electron/electron/issues/18397
if (disableHardwareAcceleration()) {
if (is.dev()) {
console.log("Disabling hardware acceleration");
}
app.disableHardwareAcceleration();
}
// Adds debug features like hotkeys for triggering dev tools and reload
require("electron-debug")();
@ -85,7 +94,7 @@ function createMainWindow() {
},
frame: !is.macOS(),
titleBarStyle: is.macOS() ? "hiddenInset" : "default",
autoHideMenuBar: true,
autoHideMenuBar: hideMenu(),
});
if (windowMaximized) {
win.maximize();
@ -197,15 +206,29 @@ app.on("ready", () => {
if (!is.dev() && autoUpdate()) {
autoUpdater.checkForUpdatesAndNotify();
autoUpdater.on("update-available", () => {
const downloadLink =
"https://github.com/th-ch/youtube-music/releases/latest";
const dialogOpts = {
type: "info",
buttons: ["OK"],
buttons: ["OK", "Download", "Disable updates"],
title: "Application Update",
message: "A new version is available",
detail:
"A new version is available and can be downloaded at https://github.com/th-ch/youtube-music/releases/latest",
detail: `A new version is available and can be downloaded at ${downloadLink}`,
};
electron.dialog.showMessageBox(dialogOpts);
electron.dialog.showMessageBox(dialogOpts).then((dialogOutput) => {
switch (dialogOutput.response) {
// Download
case 1:
electron.shell.openExternal(downloadLink);
break;
// Disable updates
case 2:
setOptions({ autoUpdates: false });
break;
default:
break;
}
});
});
}

22
menu.js
View File

@ -7,10 +7,12 @@ const {
enablePlugin,
disablePlugin,
autoUpdate,
hideMenu,
isAppVisible,
isTrayEnabled,
setOptions,
startAtLogin,
disableHardwareAcceleration,
} = require("./store");
const mainMenuTemplate = (win) => [
@ -42,6 +44,26 @@ const mainMenuTemplate = (win) => [
setOptions({ autoUpdates: item.checked });
},
},
{
label: "Disable hardware acceleration",
type: "checkbox",
checked: disableHardwareAcceleration(),
click: (item) => {
setOptions({ disableHardwareAcceleration: item.checked });
},
},
...(is.windows() || is.linux()
? [
{
label: "Hide menu",
type: "checkbox",
checked: hideMenu(),
click: (item) => {
setOptions({ hideMenu: item.checked });
},
},
]
: []),
...(is.windows() || is.macOS()
? // Only works on Win/Mac
// https://www.electronjs.org/docs/api/app#appsetloginitemsettingssettings-macos-windows

View File

@ -1,7 +1,7 @@
{
"name": "youtube-music",
"productName": "YouTube Music",
"version": "1.6.2",
"version": "1.6.5",
"description": "YouTube Music Desktop App - including custom plugins",
"license": "MIT",
"repository": "th-ch/youtube-music",
@ -33,6 +33,7 @@
"postinstall": "yarn run icon && yarn run plugins",
"clean": "rimraf dist",
"build": "yarn run clean && electron-builder --win --mac --linux",
"build:linux": "yarn run clean && electron-builder --linux",
"build:mac": "yarn run clean && electron-builder --mac",
"build:win": "yarn run clean && electron-builder --win",
"plugins": "yarn run plugin:adblocker && yarn run plugin:autoconfirm",
@ -47,7 +48,7 @@
"npm": "Please use yarn and not npm"
},
"dependencies": {
"@cliqz/adblocker-electron": "^1.18.3",
"@cliqz/adblocker-electron": "^1.18.6",
"@ffmpeg/core": "^0.8.4",
"@ffmpeg/ffmpeg": "^0.9.5",
"YoutubeNonStop": "git://github.com/lawfx/YoutubeNonStop.git#v0.8.0",
@ -59,7 +60,7 @@
"electron-updater": "^4.3.5",
"filenamify": "^4.2.0",
"node-fetch": "^2.6.1",
"ytdl-core": "^4.0.3"
"ytdl-core": "^4.1.1"
},
"devDependencies": {
"electron": "^10.1.3",

View File

@ -29,6 +29,7 @@ const downloadVideoToMP3 = (videoUrl, sendFeedback, sendError, reinit) => {
filter: "audioonly",
quality: "highestaudio",
highWaterMark: 32 * 1024 * 1024, // 32 MB
requestOptions: { maxRetries: 3 },
});
} catch (err) {
sendError(err);

View File

@ -18,6 +18,10 @@
You can check out the [latest release](https://github.com/th-ch/youtube-music/releases/latest) to quickly find the latest version.
**Arch Linux**
Install the `youtube-music-bin` package from the AUR. For AUR installation instructions, take a look at this [wiki page](https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages).
## Available plugins:
- **Ad Blocker**: block all ads and tracking out of the box

View File

@ -13,7 +13,9 @@ const store = new Store({
tray: false,
appVisible: true,
autoUpdates: true,
hideMenu: false,
startAtLogin: false,
disableHardwareAcceleration: false,
},
},
});
@ -31,5 +33,8 @@ module.exports = {
isTrayEnabled: () => store.get("options.tray"),
isAppVisible: () => store.get("options.appVisible"),
autoUpdate: () => store.get("options.autoUpdates"),
hideMenu: () => store.get("options.hideMenu"),
startAtLogin: () => store.get("options.startAtLogin"),
disableHardwareAcceleration: () =>
store.get("options.disableHardwareAcceleration"),
};

View File

@ -6,6 +6,9 @@ describe("YouTube Music App", () => {
const win = app.browserWindow;
const isMenuVisible = await win.isMenuBarVisible();
expect(isMenuVisible).toBe(true);
const isVisible = await win.isVisible();
expect(isVisible).toBe(true);

View File

@ -372,37 +372,37 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@cliqz/adblocker-content@^1.18.3":
version "1.18.3"
resolved "https://registry.yarnpkg.com/@cliqz/adblocker-content/-/adblocker-content-1.18.3.tgz#c9511f9857614303d61d5f4c37f2979cfa6f3865"
integrity sha512-mCLlGg4B8P2VWtJpSAJStR9HeRNt5Jo4D0MIOdXIkdSFjCWcXUSwqlUtu5GBvA8iFp9cGgHC/EYeyUW1SbuvYg==
"@cliqz/adblocker-content@^1.18.6":
version "1.18.6"
resolved "https://registry.yarnpkg.com/@cliqz/adblocker-content/-/adblocker-content-1.18.6.tgz#a65dd518f3e6d1f2e9fee36ca5ae5615ba7b4cfd"
integrity sha512-OXrca20n+cMn9Ase+6oeX3fTmkauQMSb//lMLs56pHyra4foxN5o1rNiBG7qNIypdGQBFiTtGG7Vbp7YO5RQMw==
"@cliqz/adblocker-electron-preload@^1.18.3":
version "1.18.3"
resolved "https://registry.yarnpkg.com/@cliqz/adblocker-electron-preload/-/adblocker-electron-preload-1.18.3.tgz#7e8c6651adea72202eb380b834d936c4486f4df0"
integrity sha512-MBfcFXpkZ08sTU1gQIVETmfpKODkc3ymg3cOpgf8RaeP0gX0RVW/trAA5LJINuOYUWXc2diNOn/GJ0W1oUjXbw==
"@cliqz/adblocker-electron-preload@^1.18.6":
version "1.18.6"
resolved "https://registry.yarnpkg.com/@cliqz/adblocker-electron-preload/-/adblocker-electron-preload-1.18.6.tgz#57ec2dac09bbacb03b143609345638e98132f985"
integrity sha512-cOK6ZuN3j0qLCZUj8oCf2PmPY837VTxtZM6bZl1x5xWLy/31x7186Wk0DP3C9MXU7gUhlqYxxKpbJDLZgFJ7Qw==
dependencies:
"@cliqz/adblocker-content" "^1.18.3"
"@cliqz/adblocker-content" "^1.18.6"
"@cliqz/adblocker-electron@^1.18.3":
version "1.18.3"
resolved "https://registry.yarnpkg.com/@cliqz/adblocker-electron/-/adblocker-electron-1.18.3.tgz#01a9fd6793afaf62ff9570f25350d33958ae7ae7"
integrity sha512-HIeg8QH4+uBxeU7CH//Yxil9DnDPxthpJNzhm0YN+I7E+PDVlxSqHcQz9Lc/5RguskO5l+PCGH+Iw8eNKPOLAg==
"@cliqz/adblocker-electron@^1.18.6":
version "1.18.6"
resolved "https://registry.yarnpkg.com/@cliqz/adblocker-electron/-/adblocker-electron-1.18.6.tgz#e387a1dc6f3f4a4005d299b37723899be4f0967b"
integrity sha512-RGy003FHsvcLoGYaQIJVNWX8ZUQmK+Dbo0LeQAcsP96vOaTHHFOVj0Auhwkg7mZASiR9/XnoNepKIifO2zQVfw==
dependencies:
"@cliqz/adblocker" "^1.18.3"
"@cliqz/adblocker-electron-preload" "^1.18.3"
"@cliqz/adblocker" "^1.18.6"
"@cliqz/adblocker-electron-preload" "^1.18.6"
tldts-experimental "^5.6.21"
"@cliqz/adblocker@^1.18.3":
version "1.18.3"
resolved "https://registry.yarnpkg.com/@cliqz/adblocker/-/adblocker-1.18.3.tgz#a1a2022f6a8d093d1c31167d4bdb5a03e0b57002"
integrity sha512-fkGky+ffAsXw9WIS+cV9zm8EMzdjRKU/uO196yCFHYICByZyREBie3lMNNKQ6RVSUeEVFOx1JlEKkY9Bze/9xQ==
"@cliqz/adblocker@^1.18.6":
version "1.18.6"
resolved "https://registry.yarnpkg.com/@cliqz/adblocker/-/adblocker-1.18.6.tgz#07d075c45017db7cd2aff19afe466ad53217d318"
integrity sha512-+ro8DoqBaMt9nmfjJF+0Om03/9hdDhRx6NJKzwmW7Pfvd/XhqJ+NiDtdusABSERhCE3nUXCWdu5j09X9HiX6Vg==
dependencies:
"@remusao/guess-url-type" "^1.1.2"
"@remusao/small" "^1.1.2"
"@remusao/smaz" "^1.7.1"
"@types/chrome" "^0.0.123"
"@types/firefox-webext-browser" "^78.0.0"
"@types/chrome" "^0.0.126"
"@types/firefox-webext-browser" "^82.0.0"
tldts-experimental "^5.6.21"
"@cnakazawa/watch@^1.0.3":
@ -1100,10 +1100,10 @@
"@types/node" "*"
"@types/responselike" "*"
"@types/chrome@^0.0.123":
version "0.0.123"
resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.123.tgz#3bd094ae3b3920e8210ca63e6b5927358fafc1a5"
integrity sha512-fG6GPreuSY+Z+0e3dtBz5MJ5qyZ2feOZISG8udxBiuwUYqykK1q4NxkjfzL2F5I05LqK2ojP7ZR08Gcfo3ubHQ==
"@types/chrome@^0.0.126":
version "0.0.126"
resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.126.tgz#f9f3436712f0c7c12ea9798abc9b95575ad7b23a"
integrity sha512-191z7uoyfbGU+z7/m45j9XbWugWqVHVPMM4hJV5cZ+3YzGCT9wFjMUHO3Wr3Xvo8aVodvRNu28u7lvEaAnfbzg==
dependencies:
"@types/filesystem" "*"
"@types/har-format" "*"
@ -1140,10 +1140,10 @@
resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.28.tgz#c054e8af4d9dd75db4e63abc76f885168714d4b3"
integrity sha1-wFTor02d11205jq8dviFFocU1LM=
"@types/firefox-webext-browser@^78.0.0":
version "78.0.1"
resolved "https://registry.yarnpkg.com/@types/firefox-webext-browser/-/firefox-webext-browser-78.0.1.tgz#9c3b929c65a8263facac03ab930b0fb0f8addfbb"
integrity sha512-0d7oiI9K6Y4efP4Crl3JB88zYl7vaRdLtumqz8v6axMF8RCnK0NaGUjL4DnyQ7GLPo98b+s0BSRalaxAXgvPAQ==
"@types/firefox-webext-browser@^82.0.0":
version "82.0.0"
resolved "https://registry.yarnpkg.com/@types/firefox-webext-browser/-/firefox-webext-browser-82.0.0.tgz#4d0f5cfebd7321d2cbf0ccfb6032570f0138b958"
integrity sha512-zKHePkjMx42KIUUZCPcUiyu1tpfQXH9VR4iDYfns3HvmKVJzt/TAFT+DFVroos8BI9RH78YgF3Hi/wlC6R6cKA==
"@types/fs-extra@^9.0.1":
version "9.0.1"
@ -5857,12 +5857,12 @@ lru-cache@^6.0.0:
dependencies:
yallist "^4.0.0"
m3u8stream@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/m3u8stream/-/m3u8stream-0.8.0.tgz#025a63358ee32d7652bdc0a93f46078582ec5e96"
integrity sha512-vvSjdkBPdDHzVr2M+aIXbnYys4zX6m3UzxMaxBJr1PpE0e/3sawkLD4EEmz/q9hv87bleotR70cOWR3UBMtskw==
m3u8stream@^0.8.3:
version "0.8.3"
resolved "https://registry.yarnpkg.com/m3u8stream/-/m3u8stream-0.8.3.tgz#c4624e92b4240eb356d040c4a5e155586cf58108"
integrity sha512-0nAcdrF8YJKUkb6PzWdvGftTPyCVWgoiot1AkNVbPKTeIGsWs6DrOjifrJ0Zi8WQfQmD2SuVCjkYIOip12igng==
dependencies:
miniget "^2.0.1"
miniget "^4.0.0"
sax "^1.2.4"
make-dir@^3.0.0, make-dir@^3.0.2:
@ -6060,15 +6060,10 @@ min-indent@^1.0.0:
resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869"
integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==
miniget@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/miniget/-/miniget-2.0.1.tgz#e2188573317ad8239bab33f056aae64804fc8e47"
integrity sha512-MX+QfVIPAutz6c+T7WKuFKtjcw0nOyRRh1ubhTDD+z/e/pKcSAsfAV63aQKUgb1MFRT1GyfJeW53N5fHkX0wIA==
miniget@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/miniget/-/miniget-2.1.0.tgz#2dfb9ecb3a9a55d9dc682102f65fca2a06e3f5ca"
integrity sha512-fy9x3d/0oOIhkwAms6kgxTYkHwdELhMfgj+9a/aYZpJdTWIIWGta9aXHUtnzUn+LjBmRoTdPRQSi2hkmEvXk3A==
miniget@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/miniget/-/miniget-4.1.0.tgz#018cc1180d2fe4d45ed735ac6bd2ab7224e8bceb"
integrity sha512-kzhrNv5L7LlomwGmPGQsLQ2PnT1LeJJWfB0wNFGyv426gEM1gsfziBQmfkr6XOBA8EusZg9nowlNT5CbuKTjZg==
minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
version "1.0.1"
@ -8941,14 +8936,14 @@ yauzl@^2.10.0:
buffer-crc32 "~0.2.3"
fd-slicer "~1.1.0"
ytdl-core@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/ytdl-core/-/ytdl-core-4.0.3.tgz#9772dc6f7f0272534d50f50903022f8502ae44fa"
integrity sha512-+pM+EocvdHHTfH3xCr3c41cIm8bD7IE/wv/QKjaO7PwdLaaOMIj7xc/7yWwy9NwUDgIKA1YTotcn0qpQ0FVtMA==
ytdl-core@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/ytdl-core/-/ytdl-core-4.1.1.tgz#191fabf472c44f969fe3eca15cb4d1c094e46282"
integrity sha512-T2VIS64sHKdLLqvuTV7S4WyoUCZLdR7HOP/9jX1CyXKYUjKLFP9UpVIFH0ZUvFSmK48eNFErWLOO5dGouwqztQ==
dependencies:
html-entities "^1.3.1"
m3u8stream "^0.8.0"
miniget "^2.1.0"
m3u8stream "^0.8.3"
miniget "^4.0.0"
sax "^1.1.3"
zip-stream@^4.0.0: