fix MPRIS bigints

This commit is contained in:
Ottomated 2024-05-18 18:03:24 -07:00
parent 9966561079
commit 9be601cf7f
3 changed files with 5 additions and 6 deletions

View File

@ -1 +0,0 @@
declare module "mpris-service";

View File

@ -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) => {

View File

@ -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;