diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ebc0af..4c9d55d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +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/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [5.12.0] + +- Added Shuffle and Repeat state to API response - By [ThatGravyBoat](https://github.com/ThatGravyBoat) + ## [5.11.0] - Re-implemented the API, added support for duration/current in seconds & shuffle+repeat diff --git a/package-lock.json b/package-lock.json index d6a04b1..8f3a7aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tidal-hifi", - "version": "5.11.0", + "version": "5.12.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "tidal-hifi", - "version": "5.11.0", + "version": "5.12.0", "license": "MIT", "dependencies": { "@electron/remote": "^2.1.2", diff --git a/package.json b/package.json index 44941ce..d88395a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tidal-hifi", - "version": "5.11.0", + "version": "5.12.0", "description": "Tidal on Electron with widevine(hifi) support", "main": "ts-dist/main.js", "scripts": { diff --git a/src/features/state.ts b/src/features/state.ts index 6a58251..824e8ac 100644 --- a/src/features/state.ts +++ b/src/features/state.ts @@ -2,6 +2,8 @@ import { TidalState } from "../models/tidalState"; export const mainTidalState: TidalState = { status: "Stopped", + repeat: "Off", + shuffle: false, }; export function getLegacyMediaInfo() { @@ -25,5 +27,10 @@ export function getLegacyMediaInfo() { durationInSeconds: mainTidalState.currentTrack?.duration ?? 0, image: "tidal-hifi-icon", favorite: false, + player: { + status: mainTidalState.status.toLowerCase(), + shuffle: mainTidalState.shuffle, + repeat: mainTidalState.repeat, + }, }; } diff --git a/src/models/tidalState.ts b/src/models/tidalState.ts index bad091f..1cd9a1d 100644 --- a/src/models/tidalState.ts +++ b/src/models/tidalState.ts @@ -1,5 +1,7 @@ export type TidalState = { status: "Playing" | "Paused" | "Stopped"; + repeat: "Off" | "All" | "Single"; + shuffle: boolean; currentTrack?: { id: number; title: string; diff --git a/src/pages/settings/settings.html b/src/pages/settings/settings.html index f27bd28..fe20bbb 100644 --- a/src/pages/settings/settings.html +++ b/src/pages/settings/settings.html @@ -433,7 +433,7 @@