Compare commits

...

2 Commits

Author SHA1 Message Date
ottomated
5ba6fac647
Merge 9be601cf7fb824665a1c9f2b57f0f6825f97524a into 3740ce5a1262198637138fda874f0f64fd2e4350 2024-05-19 01:03:32 +00:00
Ottomated
9be601cf7f fix MPRIS bigints 2024-05-18 18:03:24 -07:00
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;