mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2024-11-24 14:33:14 +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") {
|
||||
try {
|
||||
const player = Player({
|
||||
name: "tidal-hifi2",
|
||||
identity: "tidal-hifi2",
|
||||
name: "tidal-hifi",
|
||||
identity: "tidal-hifi",
|
||||
supportedUriSchemes: ["file"],
|
||||
supportedMimeTypes: [
|
||||
"audio/mpeg",
|
||||
@ -34,7 +34,7 @@ if (settingsStore.get(settings.mpris) && process.platform === "linux") {
|
||||
"audio/wav",
|
||||
],
|
||||
supportedInterfaces: ["player"],
|
||||
desktopEntry: "tidal-hifi2",
|
||||
desktopEntry: "tidal-hifi",
|
||||
});
|
||||
player.on("playPause", playPause);
|
||||
player.on("next", next);
|
||||
@ -47,7 +47,7 @@ if (settingsStore.get(settings.mpris) && process.platform === "linux") {
|
||||
player.on("quit", app.quit);
|
||||
|
||||
player.getPosition = function () {
|
||||
return toMicroseconds($tidalState.getState().currentTrack?.current ?? 0);
|
||||
return Number(toMicroseconds($tidalState.getState().currentTrack?.current ?? 0));
|
||||
};
|
||||
|
||||
$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[];
|
||||
activePlaylist: string;
|
||||
|
||||
getPosition(): number | bigint;
|
||||
getPosition(): number;
|
||||
seeked(): void;
|
||||
getTrackIndex(trackId: number): number;
|
||||
getTrack(trackId: number): string;
|
||||
|
Loading…
Reference in New Issue
Block a user