mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2024-11-24 22:42:42 +01:00
fix MPRIS bigints
This commit is contained in:
parent
9966561079
commit
9be601cf7f
1
src/declarations.d.ts
vendored
1
src/declarations.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
declare module "mpris-service";
|
|
@ -23,8 +23,8 @@ function toMicroseconds(seconds: number) {
|
|||||||
if (settingsStore.get(settings.mpris) && process.platform === "linux") {
|
if (settingsStore.get(settings.mpris) && process.platform === "linux") {
|
||||||
try {
|
try {
|
||||||
const player = Player({
|
const player = Player({
|
||||||
name: "tidal-hifi2",
|
name: "tidal-hifi",
|
||||||
identity: "tidal-hifi2",
|
identity: "tidal-hifi",
|
||||||
supportedUriSchemes: ["file"],
|
supportedUriSchemes: ["file"],
|
||||||
supportedMimeTypes: [
|
supportedMimeTypes: [
|
||||||
"audio/mpeg",
|
"audio/mpeg",
|
||||||
@ -34,7 +34,7 @@ if (settingsStore.get(settings.mpris) && process.platform === "linux") {
|
|||||||
"audio/wav",
|
"audio/wav",
|
||||||
],
|
],
|
||||||
supportedInterfaces: ["player"],
|
supportedInterfaces: ["player"],
|
||||||
desktopEntry: "tidal-hifi2",
|
desktopEntry: "tidal-hifi",
|
||||||
});
|
});
|
||||||
player.on("playPause", playPause);
|
player.on("playPause", playPause);
|
||||||
player.on("next", next);
|
player.on("next", next);
|
||||||
@ -47,7 +47,7 @@ if (settingsStore.get(settings.mpris) && process.platform === "linux") {
|
|||||||
player.on("quit", app.quit);
|
player.on("quit", app.quit);
|
||||||
|
|
||||||
player.getPosition = function () {
|
player.getPosition = function () {
|
||||||
return toMicroseconds($tidalState.getState().currentTrack?.current ?? 0);
|
return Number(toMicroseconds($tidalState.getState().currentTrack?.current ?? 0));
|
||||||
};
|
};
|
||||||
|
|
||||||
$tidalState.subscribe(async (state) => {
|
$tidalState.subscribe(async (state) => {
|
||||||
|
2
src/types/mpris-service.d.ts
vendored
2
src/types/mpris-service.d.ts
vendored
@ -43,7 +43,7 @@ declare module "mpris-service" {
|
|||||||
playlists: string[];
|
playlists: string[];
|
||||||
activePlaylist: string;
|
activePlaylist: string;
|
||||||
|
|
||||||
getPosition(): number | bigint;
|
getPosition(): number;
|
||||||
seeked(): void;
|
seeked(): void;
|
||||||
getTrackIndex(trackId: number): number;
|
getTrackIndex(trackId: number): number;
|
||||||
getTrack(trackId: number): string;
|
getTrack(trackId: number): string;
|
||||||
|
Loading…
Reference in New Issue
Block a user