mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-06-28 02:33:47 +02:00
Compare commits
No commits in common. "b807aa2f7666a6e5cd15c2a06b981d1128d7fdf5" and "eb93fbc35da30c1f013fef27e302fffad98c5cf7" have entirely different histories.
b807aa2f76
...
eb93fbc35d
@ -4,11 +4,6 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## 5.0.0
|
|
||||||
|
|
||||||
- Replaced "skipping arists" 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))
|
|
||||||
|
|
||||||
## 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.
|
||||||
|
51
README.md
51
README.md
@ -1,35 +1,34 @@
|
|||||||
# Tidal-hifi<img src = "./build/icon.png" height="40" align="right"/>
|
<h1>
|
||||||
|
Tidal-hifi
|
||||||

|
<img src = "./build/icon.png" height="40" align="right" />
|
||||||
|
</h1>
|
||||||
|
|
||||||
The web version of [listen.tidal.com](https://listen.tidal.com) running in electron with hifi support thanks to widevine.
|
The web version of [listen.tidal.com](https://listen.tidal.com) running in electron with hifi support thanks to widevine.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Table of Contents
|
## Table of contents
|
||||||
|
|
||||||
<!-- toc -->
|
<!-- toc -->
|
||||||
|
|
||||||
- [Tidal-hifi](#tidal-hifi)
|
- [Installation](#installation)
|
||||||
- [Table of Contents](#table-of-contents)
|
* [Using releases](#using-releases)
|
||||||
- [Installation](#installation)
|
* [Snap](#snap)
|
||||||
- [Using releases](#using-releases)
|
* [Arch Linux](#arch-linux)
|
||||||
- [Snap](#snap)
|
* [Flatpak](#flatpak)
|
||||||
- [Arch Linux](#arch-linux)
|
* [Nix](#nix)
|
||||||
- [Flatpak](#flatpak)
|
* [Using source](#using-source)
|
||||||
- [Nix](#nix)
|
- [Features](#features)
|
||||||
- [Using source](#using-source)
|
- [Integrations](#integrations)
|
||||||
- [Features](#features)
|
* [Known bugs](#known-bugs)
|
||||||
- [Integrations](#integrations)
|
+ [last.fm doesn't work out of the box. Use rescrobbler as a workaround](#lastfm-doesnt-work-out-of-the-box-use-rescrobbler-as-a-workaround)
|
||||||
- [Known bugs](#known-bugs)
|
- [Why](#why)
|
||||||
- [last.fm doesn't work out of the box. Use rescrobbler as a workaround](#lastfm-doesnt-work-out-of-the-box-use-rescrobbler-as-a-workaround)
|
- [Why not extend existing projects?](#why-not-extend-existing-projects)
|
||||||
- [Why](#why)
|
- [Special thanks to...](#special-thanks-to)
|
||||||
- [Why not extend existing projects?](#why-not-extend-existing-projects)
|
- [Buy me a coffee? Please don't](#buy-me-a-coffee-please-dont)
|
||||||
- [Special thanks to...](#special-thanks-to)
|
- [Images](#images)
|
||||||
- [Buy me a coffee? Please don't](#buy-me-a-coffee-please-dont)
|
* [Settings window](#settings-window)
|
||||||
- [Images](#images)
|
* [User setups](#user-setups)
|
||||||
- [Settings window](#settings-window)
|
|
||||||
- [User setups](#user-setups)
|
|
||||||
|
|
||||||
<!-- tocstop -->
|
<!-- tocstop -->
|
||||||
|
|
||||||
@ -94,7 +93,7 @@ To install and work with the code on this project follow these steps:
|
|||||||
- Notifications
|
- Notifications
|
||||||
- Custom hotkeys ([source](https://defkey.com/tidal-desktop-shortcuts))
|
- Custom hotkeys ([source](https://defkey.com/tidal-desktop-shortcuts))
|
||||||
- API for status and playback
|
- API for status and playback
|
||||||
- Disabled audio & visual ads, unlocked lyrics, suggested track, track info, and unlimited skips thanks to uBlockOrigin custom filters ([source](https://github.com/uBlockOrigin/uAssets/issues/17495))
|
- [Mute artists automatically (defaults to "Tidal")]("./docs/muting-artists.md")
|
||||||
- Custom [integrations](#integrations)
|
- Custom [integrations](#integrations)
|
||||||
- [Settings feature](./docs/settings.png) to disable certain functionality. (`ctrl+=` or `ctrl+0`)
|
- [Settings feature](./docs/settings.png) to disable certain functionality. (`ctrl+=` or `ctrl+0`)
|
||||||
- AlbumArt in integrations ([best-effort](https://github.com/Mastermindzh/tidal-hifi/pull/88#pullrequestreview-840814847))
|
- AlbumArt in integrations ([best-effort](https://github.com/Mastermindzh/tidal-hifi/pull/88#pullrequestreview-840814847))
|
||||||
@ -140,7 +139,7 @@ Whilst there are a handful of projects attempting to run Tidal on Electron they
|
|||||||
|
|
||||||
Sometimes it's just easier to start over, cover my own needs and then making it available to the public :)
|
Sometimes it's just easier to start over, cover my own needs and then making it available to the public :)
|
||||||
|
|
||||||
## Special thanks to
|
## Special thanks to...
|
||||||
|
|
||||||
- [Castlabs](https://castlabs.com/)
|
- [Castlabs](https://castlabs.com/)
|
||||||
For maintaining Electron with Widevine CDM installation, Verified Media Path (VMP), and persistent licenses (StorageID)
|
For maintaining Electron with Widevine CDM installation, Verified Media Path (VMP), and persistent licenses (StorageID)
|
||||||
|
11
docs/muting-artists.md
Normal file
11
docs/muting-artists.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Muting artists
|
||||||
|
|
||||||
|
If you feel that some of your music is embarrassing for others you can mute specific artists in the settings window.
|
||||||
|
This functionality is inspired by the [adblock ticket](https://github.com/Mastermindzh/tidal-hifi/issues/112), and whilst I personally feel you should simply buy Tidal, I also believe in muting sound that you don't want to hear.
|
||||||
|
|
||||||
|
Anyway, to block an artist, open the settings window (see image below) and enter a list of artists in the textarea as seen below.
|
||||||
|
Don't forget to turn the feature on and Tidal-hifi will automatically mute the player whenever that artist is playing.
|
||||||
|
|
||||||
|
This will allow you to skip the song without anyone noticing. (you can always say "no idea, it seems to have no audio").
|
||||||
|
|
||||||
|

|
BIN
docs/settings-muted-artists.png
Normal file
BIN
docs/settings-muted-artists.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 103 KiB |
4041
package-lock.json
generated
4041
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tidal-hifi",
|
"name": "tidal-hifi",
|
||||||
"version": "5.0.0",
|
"version": "4.4.0",
|
||||||
"description": "Tidal on Electron with widevine(hifi) support",
|
"description": "Tidal on Electron with widevine(hifi) support",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -43,9 +43,8 @@
|
|||||||
"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#v19.0.5+wvcus",
|
||||||
"electron-builder": "^24.2.1",
|
"electron-builder": "^23.3.3",
|
||||||
"js-yaml": "^3.14.1",
|
"js-yaml": "^3.14.1",
|
||||||
"markdown-toc": "^1.2.0",
|
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"sass-lint": "^1.13.1",
|
"sass-lint": "^1.13.1",
|
||||||
"sass-lint-auto-fix": "^0.21.2"
|
"sass-lint-auto-fix": "^0.21.2"
|
||||||
|
@ -13,9 +13,10 @@ const settings = {
|
|||||||
api: "api",
|
api: "api",
|
||||||
menuBar: "menuBar",
|
menuBar: "menuBar",
|
||||||
playBackControl: "playBackControl",
|
playBackControl: "playBackControl",
|
||||||
|
muteArtists: "muteArtists",
|
||||||
|
mutedArtists: "mutedArtists",
|
||||||
skipArtists: "skipArtists",
|
skipArtists: "skipArtists",
|
||||||
skippedArtists: "skippedArtists",
|
skippedArtists: "skippedArtists",
|
||||||
adBlock: "adBlock",
|
|
||||||
disableBackgroundThrottle: "disableBackgroundThrottle",
|
disableBackgroundThrottle: "disableBackgroundThrottle",
|
||||||
apiSettings: {
|
apiSettings: {
|
||||||
root: "apiSettings",
|
root: "apiSettings",
|
||||||
|
20
src/main.js
20
src/main.js
@ -1,13 +1,5 @@
|
|||||||
require("@electron/remote/main").initialize();
|
require("@electron/remote/main").initialize();
|
||||||
const {
|
const { app, BrowserWindow, components, globalShortcut, ipcMain, protocol } = require("electron");
|
||||||
app,
|
|
||||||
BrowserWindow,
|
|
||||||
components,
|
|
||||||
globalShortcut,
|
|
||||||
ipcMain,
|
|
||||||
protocol,
|
|
||||||
session,
|
|
||||||
} = require("electron");
|
|
||||||
const {
|
const {
|
||||||
settings,
|
settings,
|
||||||
store,
|
store,
|
||||||
@ -154,16 +146,6 @@ function addGlobalShortcuts() {
|
|||||||
app.on("ready", async () => {
|
app.on("ready", async () => {
|
||||||
if (isMainInstanceOrMultipleInstancesAllowed()) {
|
if (isMainInstanceOrMultipleInstancesAllowed()) {
|
||||||
await components.whenReady();
|
await components.whenReady();
|
||||||
|
|
||||||
// Adblock
|
|
||||||
if (store.get(settings.adBlock)) {
|
|
||||||
const filter = { urls: ["https://listen.tidal.com/*"] };
|
|
||||||
session.defaultSession.webRequest.onBeforeRequest(filter, (details, callback) => {
|
|
||||||
if (details.url.match(/\d\?country/)) callback({ cancel: true });
|
|
||||||
else callback({ cancel: false });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
createWindow();
|
createWindow();
|
||||||
addMenu(mainWindow);
|
addMenu(mainWindow);
|
||||||
createSettingsWindow();
|
createSettingsWindow();
|
||||||
|
@ -3,14 +3,15 @@ let trayIcon,
|
|||||||
mpris,
|
mpris,
|
||||||
enableCustomHotkeys,
|
enableCustomHotkeys,
|
||||||
enableDiscord,
|
enableDiscord,
|
||||||
|
muteArtists,
|
||||||
skipArtists,
|
skipArtists,
|
||||||
notifications,
|
notifications,
|
||||||
playBackControl,
|
playBackControl,
|
||||||
api,
|
api,
|
||||||
port,
|
port,
|
||||||
menuBar,
|
menuBar,
|
||||||
|
mutedArtists,
|
||||||
skippedArtists,
|
skippedArtists,
|
||||||
adBlock,
|
|
||||||
disableBackgroundThrottle,
|
disableBackgroundThrottle,
|
||||||
singleInstance,
|
singleInstance,
|
||||||
disableHardwareMediaKeys,
|
disableHardwareMediaKeys,
|
||||||
@ -35,9 +36,10 @@ function refreshSettings() {
|
|||||||
enableCustomHotkeys.checked = store.get(settings.enableCustomHotkeys);
|
enableCustomHotkeys.checked = store.get(settings.enableCustomHotkeys);
|
||||||
enableDiscord.checked = store.get(settings.enableDiscord);
|
enableDiscord.checked = store.get(settings.enableDiscord);
|
||||||
minimizeOnClose.checked = store.get(settings.minimizeOnClose);
|
minimizeOnClose.checked = store.get(settings.minimizeOnClose);
|
||||||
|
muteArtists.checked = store.get(settings.muteArtists);
|
||||||
|
mutedArtists.value = store.get(settings.mutedArtists).join("\n");
|
||||||
skipArtists.checked = store.get(settings.skipArtists);
|
skipArtists.checked = store.get(settings.skipArtists);
|
||||||
skippedArtists.value = store.get(settings.skippedArtists).join("\n");
|
skippedArtists.value = store.get(settings.skippedArtists).join("\n");
|
||||||
adBlock.checked = store.get(settings.adBlock);
|
|
||||||
singleInstance.checked = store.get(settings.singleInstance);
|
singleInstance.checked = store.get(settings.singleInstance);
|
||||||
disableHardwareMediaKeys.checked = store.get(settings.flags.disableHardwareMediaKeys);
|
disableHardwareMediaKeys.checked = store.get(settings.flags.disableHardwareMediaKeys);
|
||||||
gpuRasterization.checked = store.get(settings.flags.gpuRasterization);
|
gpuRasterization.checked = store.get(settings.flags.gpuRasterization);
|
||||||
@ -64,7 +66,7 @@ function hide() {
|
|||||||
*/
|
*/
|
||||||
function restart() {
|
function restart() {
|
||||||
app.relaunch();
|
app.relaunch();
|
||||||
app.exit();
|
app.quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -119,9 +121,10 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
mpris = get("mprisCheckbox");
|
mpris = get("mprisCheckbox");
|
||||||
enableCustomHotkeys = get("enableCustomHotkeys");
|
enableCustomHotkeys = get("enableCustomHotkeys");
|
||||||
enableDiscord = get("enableDiscord");
|
enableDiscord = get("enableDiscord");
|
||||||
|
muteArtists = get("muteArtists");
|
||||||
|
mutedArtists = get("mutedArtists");
|
||||||
skipArtists = get("skipArtists");
|
skipArtists = get("skipArtists");
|
||||||
skippedArtists = get("skippedArtists");
|
skippedArtists = get("skippedArtists");
|
||||||
adBlock = get("adBlock");
|
|
||||||
disableBackgroundThrottle = get("disableBackgroundThrottle");
|
disableBackgroundThrottle = get("disableBackgroundThrottle");
|
||||||
singleInstance = get("singleInstance");
|
singleInstance = get("singleInstance");
|
||||||
disableHardwareMediaKeys = get("disableHardwareMediaKeys");
|
disableHardwareMediaKeys = get("disableHardwareMediaKeys");
|
||||||
@ -139,9 +142,10 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
addInputListener(enableCustomHotkeys, settings.enableCustomHotkeys);
|
addInputListener(enableCustomHotkeys, settings.enableCustomHotkeys);
|
||||||
addInputListener(enableDiscord, settings.enableDiscord);
|
addInputListener(enableDiscord, settings.enableDiscord);
|
||||||
addInputListener(minimizeOnClose, settings.minimizeOnClose);
|
addInputListener(minimizeOnClose, settings.minimizeOnClose);
|
||||||
|
addInputListener(muteArtists, settings.muteArtists);
|
||||||
|
addTextAreaListener(mutedArtists, settings.mutedArtists);
|
||||||
addInputListener(skipArtists, settings.skipArtists);
|
addInputListener(skipArtists, settings.skipArtists);
|
||||||
addTextAreaListener(skippedArtists, settings.skippedArtists);
|
addTextAreaListener(skippedArtists, settings.skippedArtists);
|
||||||
addInputListener(adBlock, settings.adBlock);
|
|
||||||
addInputListener(disableBackgroundThrottle, settings.disableBackgroundThrottle);
|
addInputListener(disableBackgroundThrottle, settings.disableBackgroundThrottle);
|
||||||
addInputListener(singleInstance, settings.singleInstance);
|
addInputListener(singleInstance, settings.singleInstance);
|
||||||
addInputListener(disableHardwareMediaKeys, settings.flags.disableHardwareMediaKeys);
|
addInputListener(disableHardwareMediaKeys, settings.flags.disableHardwareMediaKeys);
|
||||||
|
@ -48,34 +48,33 @@
|
|||||||
<p>Show a notification when a new song starts.</p>
|
<p>Show a notification when a new song starts.</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="notifications" type="checkbox" />
|
<input id="notifications" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="group__option">
|
||||||
|
<div class="group__description">
|
||||||
|
<h4>Mute Artists automatically</h4>
|
||||||
|
<p>The following list of artists (1 per line) will be muted automatically.</p>
|
||||||
|
</div>
|
||||||
|
<label class="switch">
|
||||||
|
<input id="muteArtists" type="checkbox">
|
||||||
|
<span class="switch__slider"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<textarea id="mutedArtists" class="textarea" cols="40" rows="5" spellcheck="false"></textarea>
|
||||||
<div class="group__option">
|
<div class="group__option">
|
||||||
<div class="group__description">
|
<div class="group__description">
|
||||||
<h4>Skip Artists automatically</h4>
|
<h4>Skip Artists automatically</h4>
|
||||||
<p>The following list of artists (1 per line) will be skipped automatically.</p>
|
<p>The following list of artists (1 per line) will be skipped automatically.</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="skipArtists" type="checkbox" />
|
<input id="skipArtists" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<textarea id="skippedArtists" class="textarea" cols="40" rows="5" spellcheck="false"></textarea>
|
<textarea id="skippedArtists" class="textarea" cols="40" rows="5" spellcheck="false"></textarea>
|
||||||
<div class="group__option">
|
|
||||||
<div class="group__description">
|
|
||||||
<h4>Block ads</h4>
|
|
||||||
<p>
|
|
||||||
Disabled audio & visual ads, unlocked lyrics, suggested track, track info,
|
|
||||||
unlimited skips
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<label class="switch">
|
|
||||||
<input id="adBlock" type="checkbox" />
|
|
||||||
<span class="switch__slider"></span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="group">
|
<div class="group">
|
||||||
<p class="group__title">UI</p>
|
<p class="group__title">UI</p>
|
||||||
@ -85,7 +84,7 @@
|
|||||||
<p>Always show TIDAL Hi-Fi's menu bar.</p>
|
<p>Always show TIDAL Hi-Fi's menu bar.</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="menuBar" type="checkbox" />
|
<input id="menuBar" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -98,7 +97,7 @@
|
|||||||
<p>Show TIDAL Hi-Fi's tray icon.</p>
|
<p>Show TIDAL Hi-Fi's tray icon.</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="trayIcon" type="checkbox" />
|
<input id="trayIcon" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -108,7 +107,7 @@
|
|||||||
<p>Minimize window on close instead.</p>
|
<p>Minimize window on close instead.</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="minimizeOnClose" type="checkbox" />
|
<input id="minimizeOnClose" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -121,7 +120,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="enableCustomHotkeys" type="checkbox" />
|
<input id="enableCustomHotkeys" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -131,7 +130,7 @@
|
|||||||
<p>Prevent opening multiple TIDAL Hi-Fi's instances.</p>
|
<p>Prevent opening multiple TIDAL Hi-Fi's instances.</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="singleInstance" type="checkbox" />
|
<input id="singleInstance" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -143,8 +142,8 @@
|
|||||||
<p class="group__title">API</p>
|
<p class="group__title">API</p>
|
||||||
<div class="group__description">
|
<div class="group__description">
|
||||||
<p>
|
<p>
|
||||||
TIDAL Hi-Fi has a built-in web API to allow users to get current song information.
|
TIDAL Hi-Fi has a built-in web API to allow users to get current song information. You can optionally
|
||||||
You can optionally enable playback control as well.
|
enable playback control as well.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="group__option">
|
<div class="group__option">
|
||||||
@ -153,14 +152,14 @@
|
|||||||
<p>Enable the TIDAL Hi-Fi web API.</p>
|
<p>Enable the TIDAL Hi-Fi web API.</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="apiCheckbox" type="checkbox" />
|
<input id="apiCheckbox" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="group__option">
|
<div class="group__option">
|
||||||
<div class="group__description">
|
<div class="group__description">
|
||||||
<label for="port">API port</label>
|
<label for="port">API port</label>
|
||||||
<input id="port" type="text" class="text-input" name="port" />
|
<input id="port" type="text" class="text-input" name="port">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="group__option">
|
<div class="group__option">
|
||||||
@ -169,7 +168,7 @@
|
|||||||
<p>Enable playback control from the web API.</p>
|
<p>Enable playback control from the web API.</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="playBackControl" type="checkbox" />
|
<input id="playBackControl" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -181,20 +180,18 @@
|
|||||||
<p class="group__title">Integrations</p>
|
<p class="group__title">Integrations</p>
|
||||||
<div class="group__description">
|
<div class="group__description">
|
||||||
<p>
|
<p>
|
||||||
TIDAL Hi-Fi is extensible through the use of integrations. You can enable or
|
TIDAL Hi-Fi is extensible through the use of integrations.
|
||||||
disable them here.
|
You can enable or disable them here.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="group__option">
|
<div class="group__option">
|
||||||
<div class="group__description">
|
<div class="group__description">
|
||||||
<h4>MPRIS</h4>
|
<h4>MPRIS</h4>
|
||||||
<p>
|
<p>Enable MPRIS interface which provides a mechanism for discovery, querying and basic playback control
|
||||||
Enable MPRIS interface which provides a mechanism for discovery, querying and
|
on Linux systems.</p>
|
||||||
basic playback control on Linux systems.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="mprisCheckbox" type="checkbox" />
|
<input id="mprisCheckbox" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -204,7 +201,7 @@
|
|||||||
<p>Show what you're listening to on Discord.</p>
|
<p>Show what you're listening to on Discord.</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="enableDiscord" type="checkbox" />
|
<input id="enableDiscord" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -218,12 +215,12 @@
|
|||||||
<div class="group__description">
|
<div class="group__description">
|
||||||
<h4>Disable hardware built-in media keys</h4>
|
<h4>Disable hardware built-in media keys</h4>
|
||||||
<p>
|
<p>
|
||||||
Also prevents certain desktop environments from recognizing the chrome MPRIS
|
Also prevents certain desktop environments from recognizing the chrome
|
||||||
client separately from the custom MPRIS client.
|
MPRIS client separately from the custom MPRIS client.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="disableHardwareMediaKeys" type="checkbox" />
|
<input id="disableHardwareMediaKeys" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -233,19 +230,17 @@
|
|||||||
<p>Move a part of the rendering to the GPU for increased performance.</p>
|
<p>Move a part of the rendering to the GPU for increased performance.</p>
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="gpuRasterization" type="checkbox" />
|
<input id="gpuRasterization" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="group__option">
|
<div class="group__option">
|
||||||
<div class="group__description">
|
<div class="group__description">
|
||||||
<h4>Disable Background Throttling</h4>
|
<h4>Disable Background Throttling</h4>
|
||||||
<p>
|
<p>Makes app more responsive while in the background, at the cost of performance.</p>
|
||||||
Makes app more responsive while in the background, at the cost of performance.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="disableBackgroundThrottle" type="checkbox" />
|
<input id="disableBackgroundThrottle" type="checkbox">
|
||||||
<span class="switch__slider"></span>
|
<span class="switch__slider"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -253,20 +248,17 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="about-section" class="tabs__section about-section">
|
<section id="about-section" class="tabs__section about-section">
|
||||||
<img alt="tidal icon" class="about-section__icon" src="./icon.png" />
|
<img alt="tidal icon" class="about-section__icon" src="./icon.png">
|
||||||
<p class="about-section__text">
|
<p class="about-section__text">
|
||||||
<a class="external-link" data-url="https://github.com/Mastermindzh/tidal-hifi">TIDAL Hi-Fi</a>
|
<a class="external-link" data-url="https://github.com/Mastermindzh/tidal-hifi">TIDAL Hi-Fi</a>
|
||||||
is made by
|
is made by <a class="external-link" data-url="https://www.rickvanlieshout.com">
|
||||||
<a class="external-link" data-url="https://www.rickvanlieshout.com">
|
Rick van Lieshout</a>. <br>It uses <a class="external-link" data-url="https://castlabs.com/">Castlabs'</a>
|
||||||
Rick van Lieshout</a>. <br />It uses
|
|
||||||
<a class="external-link" data-url="https://castlabs.com/">Castlabs'</a>
|
|
||||||
version of Electron for widevine support.
|
version of Electron for widevine support.
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<p class="footer__note">
|
<p class="footer__note">Some settings may require a restart of TIDAL Hi-Fi. To do so, click the button below:
|
||||||
Some settings may require a restart of TIDAL Hi-Fi. To do so, click the button below:
|
|
||||||
</p>
|
</p>
|
||||||
<button class="footer__button" id="restart">Restart TIDAL Hi-Fi</button>
|
<button class="footer__button" id="restart">Restart TIDAL Hi-Fi</button>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -13,6 +13,7 @@ const appName = "Tidal Hifi";
|
|||||||
let currentSong = "";
|
let currentSong = "";
|
||||||
let player;
|
let player;
|
||||||
let currentPlayStatus = statuses.paused;
|
let currentPlayStatus = statuses.paused;
|
||||||
|
let isMutedArtist = true;
|
||||||
|
|
||||||
const elements = {
|
const elements = {
|
||||||
play: '*[data-test="play"]',
|
play: '*[data-test="play"]',
|
||||||
@ -300,7 +301,6 @@ function updateMediaInfo(options, notify) {
|
|||||||
"xesam:album": options.album,
|
"xesam:album": options.album,
|
||||||
"mpris:artUrl": options.image,
|
"mpris:artUrl": options.image,
|
||||||
"mpris:length": convertDuration(options.duration) * 1000 * 1000,
|
"mpris:length": convertDuration(options.duration) * 1000 * 1000,
|
||||||
"mpris:trackid": "/org/mpris/MediaPlayer2/track/" + getTrackID(),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
player.playbackStatus = options.status == statuses.paused ? "Paused" : "Playing";
|
player.playbackStatus = options.status == statuses.paused ? "Paused" : "Playing";
|
||||||
@ -313,15 +313,10 @@ function updateMediaInfo(options, notify) {
|
|||||||
* If it's a song it returns the track URL, if not it will return undefined
|
* If it's a song it returns the track URL, if not it will return undefined
|
||||||
*/
|
*/
|
||||||
function getTrackURL() {
|
function getTrackURL() {
|
||||||
const id = getTrackID();
|
|
||||||
return `https://tidal.com/browse/track/${id}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getTrackID() {
|
|
||||||
const URLelement = elements.get("title").querySelector("a");
|
const URLelement = elements.get("title").querySelector("a");
|
||||||
if (URLelement !== null) {
|
if (URLelement !== null) {
|
||||||
const id = URLelement.href.replace(/\D/g, "");
|
const id = URLelement.href.replace(/[^0-9]/g, "");
|
||||||
return id;
|
return `https://tidal.com/browse/track/${id}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return window.location;
|
return window.location;
|
||||||
@ -334,6 +329,7 @@ setInterval(function () {
|
|||||||
const title = elements.getText("title");
|
const title = elements.getText("title");
|
||||||
const artists = elements.getArtists();
|
const artists = elements.getArtists();
|
||||||
skipArtistsIfFoundInSkippedArtistsList(artists);
|
skipArtistsIfFoundInSkippedArtistsList(artists);
|
||||||
|
muteArtistIfFoundInMutedArtistsList(artists); // doing this here so that nothing can possibly fail before we call this function
|
||||||
|
|
||||||
const album = elements.getAlbumName();
|
const album = elements.getAlbumName();
|
||||||
const current = elements.getText("current");
|
const current = elements.getText("current");
|
||||||
@ -385,6 +381,24 @@ setInterval(function () {
|
|||||||
() => {}
|
() => {}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether the current artist is included in the "muted artists" list and if so it will automatically mute the player
|
||||||
|
*/
|
||||||
|
function muteArtistIfFoundInMutedArtistsList(artists) {
|
||||||
|
if (store.get(settings.muteArtists)) {
|
||||||
|
const mutedArtists = store.get(settings.mutedArtists);
|
||||||
|
if (mutedArtists.find((artist) => artist === artists) !== undefined) {
|
||||||
|
if (!elements.isMuted()) {
|
||||||
|
isMutedArtist = true;
|
||||||
|
elements.click("volume");
|
||||||
|
}
|
||||||
|
} else if (isMutedArtist && elements.isMuted()) {
|
||||||
|
elements.click("volume");
|
||||||
|
isMutedArtist = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* automatically skip a song if the artists are found in the list of artists to skip
|
* automatically skip a song if the artists are found in the list of artists to skip
|
||||||
* @param {*} artists list of artists to skip
|
* @param {*} artists list of artists to skip
|
||||||
@ -397,7 +411,7 @@ setInterval(function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 1000);
|
||||||
|
|
||||||
if (process.platform === "linux" && store.get(settings.mpris)) {
|
if (process.platform === "linux" && store.get(settings.mpris)) {
|
||||||
try {
|
try {
|
||||||
|
@ -10,9 +10,10 @@ const store = new Store({
|
|||||||
notifications: true,
|
notifications: true,
|
||||||
api: true,
|
api: true,
|
||||||
playBackControl: true,
|
playBackControl: true,
|
||||||
|
muteArtists: false,
|
||||||
|
mutedArtists: ["TIDAL"],
|
||||||
skipArtists: false,
|
skipArtists: false,
|
||||||
skippedArtists: [""],
|
skippedArtists: [""],
|
||||||
adBlock: false,
|
|
||||||
disableBackgroundThrottle: true,
|
disableBackgroundThrottle: true,
|
||||||
menuBar: true,
|
menuBar: true,
|
||||||
apiSettings: {
|
apiSettings: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user