Skip to content

Commit

Permalink
Merge branch 'feature/update' into docs/update-picture
Browse files Browse the repository at this point in the history
  • Loading branch information
Mar0xy authored Aug 19, 2023
2 parents 42be522 + 40d80e0 commit e50e7de
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 51 deletions.
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ 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/),
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]

- 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-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)
- 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)
- 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
- [DEV]:
Expand Down Expand Up @@ -89,7 +94,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- New settings window by BlueManCZ
- Fixed the desktop files in electron-builder
- icon is set to new static path based on Arch/Debian
- Name has changed to Tidal-Hifi
- Name has changed to TIDAL Hi-Fi

## 4.1.2

Expand Down Expand Up @@ -137,7 +142,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Updated to Electron 15
- Fixed the develop "build-unpacked" command
- Added setting to disable multiple tidal-hifi windows (defaults to true)
- Added setting to disable multiple TIDAL Hi-Fi windows (defaults to true)
- Added setting to disable HardwareMediaKeyHandling (defaults to false)

## 2.8.2
Expand Down Expand Up @@ -175,7 +180,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## 2.5.0

- Notify-send now correctly shows "Tidal HiFi" as the program name
- Notify-send now correctly shows "Tidal Hi-Fi" as the program name
- Updated dependencies (including electron itself)

### known issues
Expand Down
27 changes: 10 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Tidal-hifi<img src = "./build/icon.png" height="40" align="right"/>
# TIDAL Hi-Fi (Max quality) <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)

The web version of [listen.tidal.com](https://listen.tidal.com) running in electron with hifi (High & Max) support thanks to widevine.

![tidal-hifi preview](./docs/images/preview.png)
![TIDAL Hi-Fi preview](./docs/images/preview.png)

## Table of Contents

<!-- toc -->

- [Tidal-hifi](#tidal-hifi)
- [TIDAL Hi-Fi (Max quality)](#tidal-hi-fi-max-quality-)
- [Table of Contents](#table-of-contents)
- [Features](#features)
- [Contributions](#contributions)
- [Why did I create tidal-hifi?](#why-did-i-create-tidal-hifi)
- [Why did I create TIDAL Hi-Fi?](#why-did-i-create-tidal-hi-fi)
- [Why not extend existing projects?](#why-not-extend-existing-projects)
- [Installation](#installation)
- [Dependencies](#dependencies)
Expand All @@ -26,7 +26,6 @@ The web version of [listen.tidal.com](https://listen.tidal.com) running in elect
- [Using source](#using-source)
- [Integrations](#integrations)
- [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)
- [Special thanks to](#special-thanks-to)
- [Donations](#donations)
Expand Down Expand Up @@ -58,7 +57,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)

## Why did I create tidal-hifi?
## Why did I create TIDAL Hi-Fi?

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.
Expand Down Expand Up @@ -103,10 +102,10 @@ To install with `snap` you need to download the pre-packaged snap-package from t

### Arch Linux

Arch Linux users can use the AUR to install tidal-hifi:
Arch Linux users can use the AUR to install TIDAL Hi-Fi:

```sh
trizen tidal-hifi-bin
trizen tidal-hifi-git
```

### Flatpak
Expand All @@ -130,13 +129,13 @@ nix-env -iA nixpkgs.tidal-hifi
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)
- cd tidal-hifi
- cd TIDAL Hi-Fi
- npm install
- npm start

## Integrations

tidal-hifi comes with several integrations out of the box.
TIDAL Hi-Fi comes with several integrations out of the box.
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)
Expand All @@ -148,15 +147,9 @@ Integrations with other projects that are not included natively:

## 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

Most Windows users run into DRM issues when trying to use tidal-hifi.
Most Windows users run into DRM issues when trying to use TIDAL Hi-Fi.
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
Expand Down
6 changes: 3 additions & 3 deletions docs/theming.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Theming tidal-hifi
# Theming TIDAL Hi-Fi

## Table of contents

<!-- toc -->

- [Theming tidal-hifi](#theming-tidal-hifi)
- [Theming TIDAL Hi-Fi](#theming-TIDAL Hi-Fi)
- [Table of contents](#table-of-contents)
- [Custom CSS](#custom-css)
- [config](#config)
- [Warning! Themes might break](#warning-themes-might-break)

<!-- tocstop -->

By default tidal-hifi comes with a few themes.
By default TIDAL Hi-Fi comes with a few themes.
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)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"castlabs"
],
"author": "Rick van Lieshout <info@rickvanlieshout.com> (http://rickvanlieshout.com)",
"homepage": "https://github.com/Mastermindzh/tidal-hifi",
"homepage": "https://github.com/Mastermindzh/TIDAL Hi-Fi",
"license": "MIT",
"dependencies": {
"@electron/remote": "^2.0.10",
Expand Down
2 changes: 1 addition & 1 deletion src/constants/values.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default {
name: "tidal-hifi",
name: "TIDAL Hi-Fi",
};
2 changes: 1 addition & 1 deletion src/features/flags/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function setManagedFlagsFromSettings(app: App) {
for (const [key, value] of Object.entries(flagsFromSettings)) {
if (value) {
flags[key].forEach((flag) => {
Logger.log(`enabling command line option ${flag.flag} with value ${flag.value}`);
setFlag(app, flag.flag, flag.value);
});
}
Expand All @@ -37,5 +36,6 @@ export function setManagedFlagsFromSettings(app: App) {
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setFlag(app: App, flag: string, value?: any) {
Logger.log(`enabling command line option ${flag} with value ${value}`);
app.commandLine.appendSwitch(flag, value);
}
26 changes: 21 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ const tidalUrl = "https://listen.tidal.com";
let mainInhibitorId = -1;

initialize();

let mainWindow: BrowserWindow;
const icon = path.join(__dirname, "../assets/icon.png");
const PROTOCOL_PREFIX = "tidal";
const windowPreferences = {
sandbox: false,
plugins: true,
devTools: true, // I like tinkering, others might too
};

setDefaultFlags(app);
setManagedFlagsFromSettings(app);
Expand Down Expand Up @@ -84,10 +88,10 @@ function createWindow(options = { x: 0, y: 0, backgroundColor: "white" }) {
backgroundColor: options.backgroundColor,
autoHideMenuBar: true,
webPreferences: {
sandbox: false,
preload: path.join(__dirname, "preload.js"),
plugins: true,
devTools: true, // I like tinkering, others might too
...windowPreferences,
...{
preload: path.join(__dirname, "preload.js"),
},
},
});
enable(mainWindow.webContents);
Expand Down Expand Up @@ -120,6 +124,18 @@ function createWindow(options = { x: 0, y: 0, backgroundColor: "white" }) {
const { width, height } = mainWindow.getBounds();
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() {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function hide() {
}

/**
* Restart tidal-hifi after changes
* Restart TIDAL Hi-Fi after changes
*/
function restart() {
app.relaunch();
Expand Down
4 changes: 2 additions & 2 deletions src/pages/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ <h4>ListenBrainz User Token</h4>
<div class="group__description">
<h4>Update frequency</h4>
<p>
The amount of time, in milliseconds, that tidal-hifi will refresh its playback info by scraping the
The amount of time, in milliseconds, that TIDAL Hi-Fi will refresh its playback info by scraping the
website.
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.
Expand Down Expand Up @@ -300,7 +300,7 @@ <h4>Disable Background Throttling</h4>
<div class="group__description">
<h4>Wayland support</h4>
<p>
Adds a couple of Electron flags to help Tidal-hifi run smoothly on the Wayland window system.
Adds a couple of Electron flags to help TIDAL Hi-Fi run smoothly on the Wayland window system.
</p>
</div>
<label class="switch">
Expand Down
7 changes: 3 additions & 4 deletions src/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { settingsStore } from "./scripts/settings";
import { setTitle } from "./scripts/window-functions";

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

// Events
const events = {
next: "next",
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const observer = () => {
const idleStatus = {
details: `Browsing Tidal`,
largeImageKey: "tidal-hifi-icon",
largeImageText: `Tidal HiFi ${app.getVersion()}`,
largeImageText: `TIDAL Hi-Fi ${app.getVersion()}`,
instance: false,
};

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { mediaInfo } from "./mediaInfo";
import { settingsStore } from "./settings";

/**
* Function to enable tidal-hifi's express api
* Function to enable TIDAL Hi-Fi's express api
*/

// expressModule.run = function (mainWindow)
Expand Down
7 changes: 0 additions & 7 deletions src/scripts/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const getMenu = function (mainWindow: BrowserWindow) {
{
label: name,
submenu: [
{ role: "about" },
settingsMenuEntry,
{ type: "separator" },
{ role: "services" },
Expand Down Expand Up @@ -101,12 +100,6 @@ export const getMenu = function (mainWindow: BrowserWindow) {
],
},
settingsMenuEntry,
{
label: "About",
click() {
showSettingsWindow("about");
},
},
toggleWindow,
quitMenuEntry,
];
Expand Down

0 comments on commit e50e7de

Please sign in to comment.