diff --git a/CHANGELOG.md b/CHANGELOG.md index d19b93d..ab5107e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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.18.0] + +- [Dianoga](https://github.com/Dianoga) fixed the duration selector, restoring mpris & partial API data. + - PR: #554 +- Added `xesam:url` property to mpris metadata fixes [#506](https://github.com/Mastermindzh/tidal-hifi/issues/506) + ## [5.17.0] - Added an option to disable the dynamic title and set it to a static one, [#491](https://github.com/Mastermindzh/tidal-hifi/pull/491) diff --git a/package-lock.json b/package-lock.json index 8a42dd6..5aa9ca0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tidal-hifi", - "version": "5.17.0", + "version": "5.18.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "tidal-hifi", - "version": "5.17.0", + "version": "5.18.0", "license": "MIT", "dependencies": { "@electron/remote": "^2.1.2", diff --git a/package.json b/package.json index d777d02..d263935 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tidal-hifi", - "version": "5.17.0", + "version": "5.18.0", "description": "Tidal on Electron with widevine(hifi) support", "main": "ts-dist/main.js", "scripts": { diff --git a/scripts/verifyElements.js b/scripts/verifyElements.js index 76ad262..75dd9cd 100644 --- a/scripts/verifyElements.js +++ b/scripts/verifyElements.js @@ -22,12 +22,13 @@ media: '*[data-test="current-media-imagery"]', image: "img", current: '*[data-test="current-time"]', - duration: '*[class^=playbackControlsContainer] *[data-test="duration"]', + duration: '*[class^=_playbackControlsContainer] *[data-test="duration"]', bar: '*[data-test="progress-bar"]', footer: "#footerPlayer", mediaItem: "[data-type='mediaItem']", - album_header_title: '*[class^="playingFrom"] span:nth-child(2)', - playingFrom: '*[class^="playingFrom"] span:nth-child(2)', + album_header_title: '*[class^="_playingFrom"] span:nth-child(2)', + playing_from: '*[class^="_playingFrom"] span:nth-child(2)', + queue_album: "*[class^=playQueueItemsContainer] *[class^=groupTitle] span:nth-child(2)", currentlyPlaying: "[class^='isPlayingIcon'], [data-test-is-playing='true']", album_name_cell: '[class^="album"]', tracklist_row: '[data-test="tracklist-row"]', diff --git a/src/features/api/swagger.json b/src/features/api/swagger.json index bac2fc9..aaa2f5e 100644 --- a/src/features/api/swagger.json +++ b/src/features/api/swagger.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "TIDAL Hi-Fi API", - "version": "5.17.0", + "version": "5.18.0", "description": "", "license": { "name": "MIT", diff --git a/src/pages/settings/settings.html b/src/pages/settings/settings.html index 051f79a..bd5aa81 100644 --- a/src/pages/settings/settings.html +++ b/src/pages/settings/settings.html @@ -1,599 +1,513 @@ - - Tidal Hi-Fi settings - - - - - - - -
-
- - - + + + + + + + +
+
+
+ + - - + L279.721,11.767c15.705-15.687,41.139-15.687,56.832,0C352.258,27.466,352.258,52.912,336.559,68.611z" /> + + -
- - +
+ + - - + + - - + + - - + + - - + + - - + + -
-
-
-

Playback

-
-
-

Notifications

-

Show a notification when new media starts.

-
- -
-
-
-

Skip Artists automatically

-

The following list of artists (1 per line) will be skipped automatically.

-
- -
- -
-
-

Block ads

-

- Disabled audio & visual ads, unlocked lyrics, suggested track, track info, - unlimited skips -

-
- -
-
-
-

UI

-
-
-

Fixed menubar

-

Always show TIDAL Hi-Fi's menu bar.

-
- -
-
-
-

System

-
-
-

Tray icon

-

Show TIDAL Hi-Fi's tray icon.

-
- -
-
-
-

Static Window Title

-

- Makes the window title "TIDAL Hi-Fi" instead of changing to the currently - playing song. -

-
- -
-
-
-

Minimize on Close

-

Minimize window on close instead.

-
- -
-
-
-

Hotkeys

-

- Enable extra hotkeys to achieve feature parity with the - desktop apps. -

-
- -
-
-
-

Single instance

-

Prevent opening multiple TIDAL Hi-Fi's instances.

-
- -
-
-
- -
-
-

API

+
+
+
+

Playback

+
+

Notifications

+

Show a notification when new media starts.

+
+ +
+
+
+

Skip Artists automatically

+

The following list of artists (1 per line) will be skipped automatically.

+
+ +
+ +
+
+

Block ads

- TIDAL Hi-Fi has a built-in web API to allow users to get current media - information. You can optionally enable playback control as well. + Disabled audio & visual ads, unlocked lyrics, suggested track, track info, + unlimited skips

-
-
-

Web API

-

Enable the TIDAL Hi-Fi web API.

-
- -
-
-
- - -
-
-
-
-

API hostname

-

- By default (127.0.0.1) only local apps can interface with the API.
- Change to 0.0.0.0 to allow anyone to interact with it.
- Other options are available -

- -
-
-
-
-

Playback control

-

Enable playback control from the web API.

-
- -
+
-
- -
-
-

Integrations

+
+
+

UI

+
+

Fixed menubar

+

Always show TIDAL Hi-Fi's menu bar.

+
+ +
+
+
+

System

+
+
+

Tray icon

+

Show TIDAL Hi-Fi's tray icon.

+
+ +
+
+
+

Static Window Title

- TIDAL Hi-Fi is extensible through the use of integrations. You can enable or - disable them here. + Makes the window title "TIDAL Hi-Fi" instead of changing to the currently + playing song.

-
-
-

MPRIS

-

- Enable MPRIS interface which provides a mechanism for discovery, querying and - basic playback control on Linux systems. -

-
- + +
+
+
+

Minimize on Close

+

Minimize window on close instead.

+
+ +
+
+
+

Hotkeys

+

+ Enable extra hotkeys to achieve feature parity with the + desktop apps. +

+
+ +
+
+
+

Single instance

+

Prevent opening multiple TIDAL Hi-Fi's instances.

+
+ +
+
+
+ +
+
+

API

+
+

+ TIDAL Hi-Fi has a built-in web API to allow users to get current media + information. You can optionally enable playback control as well. +

+
+
+
+

Web API

+

Enable the TIDAL Hi-Fi web API.

+
+ +
+
+
+ +
-
-

Discord

-
+
+
+

API hostname

+

+ By default (127.0.0.1) only local apps can interface with the API.
+ Change to 0.0.0.0 to allow anyone to interact with it.
+ Other options are available +

+ +
+
+
+
+

Playback control

+

Enable playback control from the web API.

+
+ +
+
+
+ +
+
+

Integrations

+
+

+ TIDAL Hi-Fi is extensible through the use of integrations. You can enable or + disable them here. +

+
+
+
+

MPRIS

+

+ Enable MPRIS interface which provides a mechanism for discovery, querying and + basic playback control on Linux systems. +

+
+ +
+
+
+

Discord

+
+
+

Discord RPC

+

Show what you're listening to on Discord.

+
+ +
+
+
-

Discord RPC

-

Show what you're listening to on Discord.

+

Show Idle Text

+

Should the idle text be shown when idle?

-
+ +
+
+

Idle Text

+

The text displayed on Discord's rich presence while idling in the app.

+ +
+
+ +
+
+

Using Tidal Text

+

+ The text displayed on Discord's rich presence while "showSong" is turned off +

+ +
+
+ +
+
+

Show media

+

Show the current media in the Discord client

+
+ +
+ + -
-

ListenBrainz

-
-
-

Enable ListenBrainz

-

Scrobble your listens directly to ListenBrainz.

-
- -
- +
+
+

ListenBrainz

+
-

ScrobbleDelay

+

Enable ListenBrainz

+

Scrobble your listens directly to ListenBrainz.

+
+ +
+ +
+

ScrobbleDelay

+

+ The delay (in ms) to send a listen to ListenBrainz. Prevents spamming the API when + you fast forward immediately +

+ +
+
+
+ +
+
+

Settings

+
+
+

Update frequency

- The delay (in ms) to send a listen to ListenBrainz. Prevents spamming the API when - you fast forward immediately + 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.

- +
-
-
-
-

Settings

-
-
-

Update frequency

-

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

- -
-
- -
-
-

Tidal channel / URL

-

- Which URL Tidal Hi-Fi should use. - note! Beta might break at any time -

- -
+
+
+

Tidal channel / URL

+

+ Which URL Tidal Hi-Fi should use. + note! Beta might break at any time +

+
-
-

Flags

-
-
-

Disable hardware built-in media keys

-

- Also prevents certain desktop environments from recognizing the chrome MPRIS - client separately from the custom MPRIS client. -

-
- +
+
+

Flags

+
+
+

Disable hardware built-in media keys

+

+ Also prevents certain desktop environments from recognizing the chrome MPRIS + client separately from the custom MPRIS client. +

-
-
-

Enable GPU rasterization

-

Move a part of the rendering to the GPU for increased performance.

-
- + +
+
+
+

Enable GPU rasterization

+

Move a part of the rendering to the GPU for increased performance.

-
-
-

Disable Background Throttling

-

- Makes app more responsive while in the background, at the cost of performance. -

-
- + +
+
+
+

Disable Background Throttling

+

+ Makes app more responsive while in the background, at the cost of performance. +

-
-
-

Wayland support

-

- Adds a couple of Electron flags to help TIDAL Hi-Fi run smoothly on the Wayland - window system. -

-
- + +
+
+
+

Wayland support

+

+ Adds a couple of Electron flags to help TIDAL Hi-Fi run smoothly on the Wayland + window system. +

+
+ +
+
+
+ +
+
+

Theming

+
+
+

Custom CSS

+

+ The css that you put in here will be injected into a style tag in the head of + the document. +

-
+
+ -
-
-

Theming

-
-
-

Custom CSS

-

- The css that you put in here will be injected into a style tag in the head of - the document. -

-
+
+

Theme files

+
+
+

Current theme

+

+ Select a theme below or "Tidal - Default" to return to the original Tidal look. +

+
- -
-

Theme files

-
-
-

Current theme

-

- Select a theme below or "Tidal - Default" to return to the original Tidal look. -

- -
-
- -
-
-

Upload new themes

-

- Click the button and select the css files to import. They will be added to the - theme list automatically. -

-
-
- Choose files - or drag and drop files here - -
+
+
+

Upload new themes

+

+ Click the button and select the css files to import. They will be added to the + theme list automatically. +

+
+
+ Choose files + or drag and drop files here +
-
+
+
-
- tidal icon -

TIDAL Hi-Fi

-
- 5.17.0 -
- -
+
+ tidal icon +

TIDAL Hi-Fi

+
+ 5.18.0 +
+ +
-
- -
-
-
-
- - + +
+ + + + + \ No newline at end of file diff --git a/src/preload.ts b/src/preload.ts index 172a148..d374ccc 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -313,6 +313,7 @@ function updateMpris(mediaInfo: MediaInfo) { "xesam:title": mediaInfo.title, "xesam:artist": [mediaInfo.artists], "xesam:album": mediaInfo.album, + "xesam:url": mediaInfo.url, "mpris:artUrl": mediaInfo.image, "mpris:length": convertDurationToSeconds(mediaInfo.duration) * 1000 * 1000, "mpris:trackid": "/org/mpris/MediaPlayer2/track/" + tidalController.getTrackId(), diff --git a/src/scripts/discord.ts b/src/scripts/discord.ts index 2efe69b..95c2287 100644 --- a/src/scripts/discord.ts +++ b/src/scripts/discord.ts @@ -103,8 +103,7 @@ const getActivity = (): SetActivity => { if (includeTimestamps) { const currentSeconds = convertDurationToSeconds(mediaInfo.current); const durationSeconds = convertDurationToSeconds(mediaInfo.duration); - const date = new Date(); - const now = Math.floor(date.getTime() / 1000); + const now = Math.trunc((Date.now() + 500) / 1000); presence.startTimestamp = now - currentSeconds; presence.endTimestamp = presence.startTimestamp + durationSeconds; }