Compare commits

...

5 Commits

7 changed files with 786 additions and 7217 deletions

View File

@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@master - uses: actions/checkout@master
- uses: actions/setup-node@master - uses: actions/setup-node@master
with: with:
node-version: 16 node-version: 19
- run: npm install - run: npm install
- run: npm run build - run: npm run build
@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@master - uses: actions/checkout@master
- uses: actions/setup-node@master - uses: actions/setup-node@master
with: with:
node-version: 16 node-version: 19
- run: npm install - run: npm install
- run: npm run build - run: npm run build
@ -36,6 +36,6 @@ jobs:
- uses: actions/checkout@master - uses: actions/checkout@master
- uses: actions/setup-node@master - uses: actions/setup-node@master
with: with:
node-version: 16 node-version: 19
- run: npm install - run: npm install
- run: npm run build - run: npm run build

View File

@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Replaced "muting artists" with a full implementation of an Adblock mechanism - Replaced "muting artists" with a full implementation of an Adblock mechanism
> Disabled audio & visual ads, unlocked lyrics, suggested track, track info, unlimited skips thanks to uBlockOrigin custom filters ([source](https://github.com/uBlockOrigin/uAssets/issues/17495)) > Disabled audio & visual ads, unlocked lyrics, suggested track, track info, unlimited skips thanks to uBlockOrigin custom filters ([source](https://github.com/uBlockOrigin/uAssets/issues/17495))
- @thanasistrisp updated Electron to 24.1.2 and fixed the tray bug :)
## 4.4.0 ## 4.4.0
- Updated shortcut hint on the menubar to reflect the new `ctrl+=` shortcut. - Updated shortcut hint on the menubar to reflect the new `ctrl+=` shortcut.

View File

@ -1,7 +1,7 @@
appId: com.rickvanlieshout.tidal-hifi appId: com.rickvanlieshout.tidal-hifi
electronVersion: 19.0.5 electronVersion: 24.1.2
electronDownload: electronDownload:
version: 19.0.5+wvcus version: 24.1.2+wvcus
mirror: https://github.com/castlabs/electron-releases/releases/download/v mirror: https://github.com/castlabs/electron-releases/releases/download/v
snap: snap:
plugs: plugs:

7968
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -35,16 +35,16 @@
"discord-rpc": "^4.0.1", "discord-rpc": "^4.0.1",
"electron-store": "^8.1.0", "electron-store": "^8.1.0",
"express": "^4.18.2", "express": "^4.18.2",
"hotkeys-js": "^3.10.1", "hotkeys-js": "^3.10.2",
"mpris-service": "^2.1.2", "mpris-service": "^2.1.2",
"request": "^2.88.2", "request": "^2.88.2",
"sass": "^1.62.0" "sass": "^1.62.0"
}, },
"devDependencies": { "devDependencies": {
"@mastermindzh/prettier-config": "^1.0.0", "@mastermindzh/prettier-config": "^1.0.0",
"electron": "git+https://github.com/castlabs/electron-releases.git#v19.0.5+wvcus", "electron": "git+https://github.com/castlabs/electron-releases.git#v24.1.2+wvcus",
"electron-builder": "^24.2.1", "electron-builder": "^24.2.1",
"js-yaml": "^3.14.1", "js-yaml": "^4.1.0",
"markdown-toc": "^1.2.0", "markdown-toc": "^1.2.0",
"prettier": "^2.8.7", "prettier": "^2.8.7",
"sass-lint": "^1.13.1", "sass-lint": "^1.13.1",

View File

@ -91,6 +91,7 @@ function createWindow(options = {}) {
backgroundColor: options.backgroundColor, backgroundColor: options.backgroundColor,
autoHideMenuBar: true, autoHideMenuBar: true,
webPreferences: { webPreferences: {
sandbox: false,
preload: path.join(__dirname, "preload.js"), preload: path.join(__dirname, "preload.js"),
plugins: true, plugins: true,
devTools: true, // I like tinkering, others might too devTools: true, // I like tinkering, others might too
@ -159,7 +160,7 @@ app.on("ready", async () => {
if (store.get(settings.adBlock)) { if (store.get(settings.adBlock)) {
const filter = { urls: ["https://listen.tidal.com/*"] }; const filter = { urls: ["https://listen.tidal.com/*"] };
session.defaultSession.webRequest.onBeforeRequest(filter, (details, callback) => { session.defaultSession.webRequest.onBeforeRequest(filter, (details, callback) => {
if (details.url.match(/\d\?country/)) callback({ cancel: true }); if (details.url.match(/\/users\/.*\d\?country/)) callback({ cancel: true });
else callback({ cancel: false }); else callback({ cancel: false });
}); });
} }

View File

@ -13,7 +13,15 @@ trayModule.addTray = function (mainWindow, options = { icon: "" }) {
tray.setContextMenu(menu); tray.setContextMenu(menu);
tray.on("click", function () { tray.on("click", function () {
mainWindow.isVisible() ? mainWindow.focus() : mainWindow.show(); if (mainWindow.isVisible()) {
if (!mainWindow.isFocused()) {
mainWindow.focus();
} else {
mainWindow.hide();
}
} else {
mainWindow.show();
}
}); });
}; };