Compare commits

..

No commits in common. "1610e3cc05e6ceba081f784d271ea836ccf12dff" and "42be522b8e24154f5a6c88c803e3624604232985" have entirely different histories.

14 changed files with 50 additions and 57 deletions

View File

@ -4,16 +4,10 @@ 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.7.0]
- Renamed app to TIDAL Hi-Fi.
- Made sure all windows run with the same web preferences set (compared to main app).
- Fixes the last.fm bug.
## [5.6.0] ## [5.6.0]
- Added support for Wayland (on by default) fixes [#262](https://github.com/Mastermindzh/tidal-hifi/issues/262) and [#157](https://github.com/Mastermindzh/tidal-hifi/issues/157) - Added support for Wayland (on by default) fixes [#262](https://github.com/Mastermindzh/tidal-hifi/issues/262) and [#157](https://github.com/Mastermindzh/tidal-hifi/issues/157)
- Made it clear in the readme that this TIDAL Hi-Fi client supports High & Max audio settings. fixes [#261](https://github.com/Mastermindzh/tidal-hifi/issues/261) - Made it clear in the readme that this tidal-hifi client supports High & Max audio settings. fixes [#261](https://github.com/Mastermindzh/tidal-hifi/issues/261)
- Added app suspension inhibitors when music is playing. fixes [#257](https://github.com/Mastermindzh/tidal-hifi/issues/257) - Added app suspension inhibitors when music is playing. fixes [#257](https://github.com/Mastermindzh/tidal-hifi/issues/257)
- Fixed bug with theme files from user directory trying to load: "an error occurred reading the theme file" - Fixed bug with theme files from user directory trying to load: "an error occurred reading the theme file"
- Fixed: config flags not being set correctly - Fixed: config flags not being set correctly
@ -95,7 +89,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- New settings window by BlueManCZ - New settings window by BlueManCZ
- Fixed the desktop files in electron-builder - Fixed the desktop files in electron-builder
- icon is set to new static path based on Arch/Debian - icon is set to new static path based on Arch/Debian
- Name has changed to TIDAL Hi-Fi - Name has changed to Tidal-Hifi
## 4.1.2 ## 4.1.2
@ -143,7 +137,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated to Electron 15 - Updated to Electron 15
- Fixed the develop "build-unpacked" command - Fixed the develop "build-unpacked" command
- Added setting to disable multiple TIDAL Hi-Fi windows (defaults to true) - Added setting to disable multiple tidal-hifi windows (defaults to true)
- Added setting to disable HardwareMediaKeyHandling (defaults to false) - Added setting to disable HardwareMediaKeyHandling (defaults to false)
## 2.8.2 ## 2.8.2
@ -181,7 +175,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 2.5.0 ## 2.5.0
- Notify-send now correctly shows "Tidal Hi-Fi" as the program name - Notify-send now correctly shows "Tidal HiFi" as the program name
- Updated dependencies (including electron itself) - Updated dependencies (including electron itself)
### known issues ### known issues

View File

@ -1,20 +1,20 @@
# TIDAL Hi-Fi (Max quality) <img src = "./build/icon.png" height="40" align="right"/> # Tidal-hifi<img src = "./build/icon.png" height="40" align="right"/>
![GitHub release](https://img.shields.io/github/release/Mastermindzh/tidal-hifi.svg) [![github builds](https://github.com/mastermindzh/tidal-hifi/actions/workflows/build.yml/badge.svg)](https://github.com/Mastermindzh/tidal-hifi/actions) [![Build Status](https://ci.mastermindzh.tech/api/badges/Mastermindzh/tidal-hifi/status.svg)](https://ci.mastermindzh.tech/Mastermindzh/tidal-hifi) [![Discord logo](./docs/images/discord.png)](https://discord.gg/yhNwf4v4He) ![GitHub release](https://img.shields.io/github/release/Mastermindzh/tidal-hifi.svg) [![github builds](https://github.com/mastermindzh/tidal-hifi/actions/workflows/build.yml/badge.svg)](https://github.com/Mastermindzh/tidal-hifi/actions) [![Build Status](https://ci.mastermindzh.tech/api/badges/Mastermindzh/tidal-hifi/status.svg)](https://ci.mastermindzh.tech/Mastermindzh/tidal-hifi) [![Discord logo](./docs/images/discord.png)](https://discord.gg/yhNwf4v4He)
The web version of [listen.tidal.com](https://listen.tidal.com) running in electron with hifi (High & Max) support thanks to widevine. The web version of [listen.tidal.com](https://listen.tidal.com) running in electron with hifi (High & Max) support thanks to widevine.
![TIDAL Hi-Fi preview](./docs/images/preview.png) ![tidal-hifi preview](./docs/images/preview.png)
## Table of Contents ## Table of Contents
<!-- toc --> <!-- toc -->
- [TIDAL Hi-Fi (Max quality)](#tidal-hi-fi-max-quality-) - [Tidal-hifi](#tidal-hifi)
- [Table of Contents](#table-of-contents) - [Table of Contents](#table-of-contents)
- [Features](#features) - [Features](#features)
- [Contributions](#contributions) - [Contributions](#contributions)
- [Why did I create TIDAL Hi-Fi?](#why-did-i-create-tidal-hi-fi) - [Why did I create tidal-hifi?](#why-did-i-create-tidal-hifi)
- [Why not extend existing projects?](#why-not-extend-existing-projects) - [Why not extend existing projects?](#why-not-extend-existing-projects)
- [Installation](#installation) - [Installation](#installation)
- [Dependencies](#dependencies) - [Dependencies](#dependencies)
@ -26,6 +26,7 @@ The web version of [listen.tidal.com](https://listen.tidal.com) running in elect
- [Using source](#using-source) - [Using source](#using-source)
- [Integrations](#integrations) - [Integrations](#integrations)
- [Known bugs](#known-bugs) - [Known bugs](#known-bugs)
- [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)
- [DRM not working on Windows](#drm-not-working-on-windows) - [DRM not working on Windows](#drm-not-working-on-windows)
- [Special thanks to](#special-thanks-to) - [Special thanks to](#special-thanks-to)
- [Donations](#donations) - [Donations](#donations)
@ -57,7 +58,7 @@ To contribute you can use the standard GitHub features (issues, prs, etc) or joi
- ![Discord logo](./docs/images/discord.png) [Join the Discord server](https://discord.gg/yhNwf4v4He) - ![Discord logo](./docs/images/discord.png) [Join the Discord server](https://discord.gg/yhNwf4v4He)
## Why did I create TIDAL Hi-Fi? ## Why did I create tidal-hifi?
I moved from Spotify over to Tidal and found Linux support to be lacking. I moved from Spotify over to Tidal and found Linux support to be lacking.
When I started this project there weren't any Linux apps that offered Tidal's "hifi" options nor any scripts to control it. When I started this project there weren't any Linux apps that offered Tidal's "hifi" options nor any scripts to control it.
@ -102,10 +103,10 @@ To install with `snap` you need to download the pre-packaged snap-package from t
### Arch Linux ### Arch Linux
Arch Linux users can use the AUR to install TIDAL Hi-Fi: Arch Linux users can use the AUR to install tidal-hifi:
```sh ```sh
trizen tidal-hifi-git trizen tidal-hifi-bin
``` ```
### Flatpak ### Flatpak
@ -129,13 +130,13 @@ nix-env -iA nixpkgs.tidal-hifi
To install and work with the code on this project follow these steps: To install and work with the code on this project follow these steps:
- git clone [https://github.com/Mastermindzh/tidal-hifi.git](https://github.com/Mastermindzh/tidal-hifi.git) - git clone [https://github.com/Mastermindzh/tidal-hifi.git](https://github.com/Mastermindzh/tidal-hifi.git)
- cd TIDAL Hi-Fi - cd tidal-hifi
- npm install - npm install
- npm start - npm start
## Integrations ## Integrations
TIDAL Hi-Fi comes with several integrations out of the box. tidal-hifi comes with several integrations out of the box.
You can find these in the settings menu (`ctrl + =` by default) under the "integrations" tab. You can find these in the settings menu (`ctrl + =` by default) under the "integrations" tab.
![integrations menu, showing a list of integrations](./docs/images/integrations.png) ![integrations menu, showing a list of integrations](./docs/images/integrations.png)
@ -147,9 +148,15 @@ Integrations with other projects that are not included natively:
## Known bugs ## Known bugs
### last.fm doesn't work out of the box. Use rescrobbler as a workaround
The last.fm login doesn't work, as is evident from the following issue: [Last.fm login doesn't work](https://github.com/Mastermindzh/tidal-hifi/issues/4).
However, in that same issue you can read about a workaround using [rescrobbler](https://github.com/InputUsername/rescrobbled).
For now, that will be the default workaround.
### DRM not working on Windows ### DRM not working on Windows
Most Windows users run into DRM issues when trying to use TIDAL Hi-Fi. Most Windows users run into DRM issues when trying to use tidal-hifi.
Nothing I can do about that I'm afraid... Tidal is working on removing/changing DRM so when they finish with that we can give it another shot. Nothing I can do about that I'm afraid... Tidal is working on removing/changing DRM so when they finish with that we can give it another shot.
## Special thanks to ## Special thanks to

View File

@ -1,10 +1,10 @@
# Theming TIDAL Hi-Fi # Theming tidal-hifi
## Table of contents ## Table of contents
<!-- toc --> <!-- toc -->
- [Theming TIDAL Hi-Fi](#theming-TIDAL Hi-Fi) - [Theming tidal-hifi](#theming-tidal-hifi)
- [Table of contents](#table-of-contents) - [Table of contents](#table-of-contents)
- [Custom CSS](#custom-css) - [Custom CSS](#custom-css)
- [config](#config) - [config](#config)
@ -12,7 +12,7 @@
<!-- tocstop --> <!-- tocstop -->
By default TIDAL Hi-Fi comes with a few themes. By default tidal-hifi comes with a few themes.
You can select these in the settings window under the theming tab as shown below. You can select these in the settings window under the theming tab as shown below.
![Settings window with the theming tab opened](./images/theming.png) ![Settings window with the theming tab opened](./images/theming.png)

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{ {
"name": "TIDAL Hi-Fi", "name": "tidal-hifi",
"version": "5.6.0", "version": "5.6.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "TIDAL Hi-Fi", "name": "tidal-hifi",
"version": "5.6.0", "version": "5.6.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {

View File

@ -35,7 +35,7 @@
"castlabs" "castlabs"
], ],
"author": "Rick van Lieshout <info@rickvanlieshout.com> (http://rickvanlieshout.com)", "author": "Rick van Lieshout <info@rickvanlieshout.com> (http://rickvanlieshout.com)",
"homepage": "https://github.com/Mastermindzh/TIDAL Hi-Fi", "homepage": "https://github.com/Mastermindzh/tidal-hifi",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@electron/remote": "^2.0.10", "@electron/remote": "^2.0.10",

View File

@ -1,3 +1,3 @@
export default { export default {
name: "TIDAL Hi-Fi", name: "tidal-hifi",
}; };

View File

@ -21,6 +21,7 @@ export function setManagedFlagsFromSettings(app: App) {
for (const [key, value] of Object.entries(flagsFromSettings)) { for (const [key, value] of Object.entries(flagsFromSettings)) {
if (value) { if (value) {
flags[key].forEach((flag) => { flags[key].forEach((flag) => {
Logger.log(`enabling command line option ${flag.flag} with value ${flag.value}`);
setFlag(app, flag.flag, flag.value); setFlag(app, flag.flag, flag.value);
}); });
} }
@ -36,6 +37,5 @@ export function setManagedFlagsFromSettings(app: App) {
*/ */
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
function setFlag(app: App, flag: string, value?: any) { function setFlag(app: App, flag: string, value?: any) {
Logger.log(`enabling command line option ${flag} with value ${value}`);
app.commandLine.appendSwitch(flag, value); app.commandLine.appendSwitch(flag, value);
} }

View File

@ -37,14 +37,10 @@ const tidalUrl = "https://listen.tidal.com";
let mainInhibitorId = -1; let mainInhibitorId = -1;
initialize(); initialize();
let mainWindow: BrowserWindow; let mainWindow: BrowserWindow;
const icon = path.join(__dirname, "../assets/icon.png"); const icon = path.join(__dirname, "../assets/icon.png");
const PROTOCOL_PREFIX = "tidal"; const PROTOCOL_PREFIX = "tidal";
const windowPreferences = {
sandbox: false,
plugins: true,
devTools: true, // I like tinkering, others might too
};
setDefaultFlags(app); setDefaultFlags(app);
setManagedFlagsFromSettings(app); setManagedFlagsFromSettings(app);
@ -88,10 +84,10 @@ function createWindow(options = { x: 0, y: 0, backgroundColor: "white" }) {
backgroundColor: options.backgroundColor, backgroundColor: options.backgroundColor,
autoHideMenuBar: true, autoHideMenuBar: true,
webPreferences: { webPreferences: {
...windowPreferences, sandbox: false,
...{
preload: path.join(__dirname, "preload.js"), preload: path.join(__dirname, "preload.js"),
}, plugins: true,
devTools: true, // I like tinkering, others might too
}, },
}); });
enable(mainWindow.webContents); enable(mainWindow.webContents);
@ -124,18 +120,6 @@ function createWindow(options = { x: 0, y: 0, backgroundColor: "white" }) {
const { width, height } = mainWindow.getBounds(); const { width, height } = mainWindow.getBounds();
settingsStore.set(settings.windowBounds.root, { width, height }); settingsStore.set(settings.windowBounds.root, { width, height });
}); });
mainWindow.webContents.setWindowOpenHandler(() => {
return {
action: "allow",
overrideBrowserWindowOptions: {
webPreferences: {
sandbox: false,
plugins: true,
devTools: true, // I like tinkering, others might too
},
},
};
});
} }
function registerHttpProtocols() { function registerHttpProtocols() {

View File

@ -118,7 +118,7 @@ function hide() {
} }
/** /**
* Restart TIDAL Hi-Fi after changes * Restart tidal-hifi after changes
*/ */
function restart() { function restart() {
app.relaunch(); app.relaunch();

View File

@ -250,7 +250,7 @@
<div class="group__description"> <div class="group__description">
<h4>Update frequency</h4> <h4>Update frequency</h4>
<p> <p>
The amount of time, in milliseconds, that TIDAL Hi-Fi will refresh its playback info by scraping the The amount of time, in milliseconds, that tidal-hifi will refresh its playback info by scraping the
website. website.
The default of 500 seems to work in more cases but if you are fine with a bit more resource usage you The default of 500 seems to work in more cases but if you are fine with a bit more resource usage you
can decrease it as well. can decrease it as well.
@ -300,7 +300,7 @@
<div class="group__description"> <div class="group__description">
<h4>Wayland support</h4> <h4>Wayland support</h4>
<p> <p>
Adds a couple of Electron flags to help TIDAL Hi-Fi run smoothly on the Wayland window system. Adds a couple of Electron flags to help Tidal-hifi run smoothly on the Wayland window system.
</p> </p>
</div> </div>
<label class="switch"> <label class="switch">

View File

@ -20,7 +20,7 @@ import { settingsStore } from "./scripts/settings";
import { setTitle } from "./scripts/window-functions"; import { setTitle } from "./scripts/window-functions";
const notificationPath = `${app.getPath("userData")}/notification.jpg`; const notificationPath = `${app.getPath("userData")}/notification.jpg`;
const appName = "TIDAL Hi-Fi"; const appName = "Tidal Hifi";
let currentSong = ""; let currentSong = "";
let player: Player; let player: Player;
let currentPlayStatus = MediaStatus.paused; let currentPlayStatus = MediaStatus.paused;
@ -531,8 +531,8 @@ setInterval(function () {
if (process.platform === "linux" && settingsStore.get(settings.mpris)) { if (process.platform === "linux" && settingsStore.get(settings.mpris)) {
try { try {
player = Player({ player = Player({
name: "TIDAL Hi-Fi", name: "tidal-hifi",
identity: "TIDAL Hi-Fi", identity: "tidal-hifi",
supportedUriSchemes: ["file"], supportedUriSchemes: ["file"],
supportedMimeTypes: [ supportedMimeTypes: [
"audio/mpeg", "audio/mpeg",
@ -544,6 +544,7 @@ if (process.platform === "linux" && settingsStore.get(settings.mpris)) {
supportedInterfaces: ["player"], supportedInterfaces: ["player"],
desktopEntry: "tidal-hifi", desktopEntry: "tidal-hifi",
}); });
// Events // Events
const events = { const events = {
next: "next", next: "next",

View File

@ -53,7 +53,7 @@ const observer = () => {
const idleStatus = { const idleStatus = {
details: `Browsing Tidal`, details: `Browsing Tidal`,
largeImageKey: "tidal-hifi-icon", largeImageKey: "tidal-hifi-icon",
largeImageText: `TIDAL Hi-Fi ${app.getVersion()}`, largeImageText: `Tidal HiFi ${app.getVersion()}`,
instance: false, instance: false,
}; };

View File

@ -8,7 +8,7 @@ import { mediaInfo } from "./mediaInfo";
import { settingsStore } from "./settings"; import { settingsStore } from "./settings";
/** /**
* Function to enable TIDAL Hi-Fi's express api * Function to enable tidal-hifi's express api
*/ */
// expressModule.run = function (mainWindow) // expressModule.run = function (mainWindow)

View File

@ -33,6 +33,7 @@ export const getMenu = function (mainWindow: BrowserWindow) {
{ {
label: name, label: name,
submenu: [ submenu: [
{ role: "about" },
settingsMenuEntry, settingsMenuEntry,
{ type: "separator" }, { type: "separator" },
{ role: "services" }, { role: "services" },
@ -100,6 +101,12 @@ export const getMenu = function (mainWindow: BrowserWindow) {
], ],
}, },
settingsMenuEntry, settingsMenuEntry,
{
label: "About",
click() {
showSettingsWindow("about");
},
},
toggleWindow, toggleWindow,
quitMenuEntry, quitMenuEntry,
]; ];