Compare commits

..

1 Commits

3 changed files with 6 additions and 5 deletions

1
src/declarations.d.ts vendored Normal file
View File

@ -0,0 +1 @@
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-hifi",
identity: "tidal-hifi",
name: "tidal-hifi2",
identity: "tidal-hifi2",
supportedUriSchemes: ["file"],
supportedMimeTypes: [
"audio/mpeg",
@ -34,7 +34,7 @@ if (settingsStore.get(settings.mpris) && process.platform === "linux") {
"audio/wav",
],
supportedInterfaces: ["player"],
desktopEntry: "tidal-hifi",
desktopEntry: "tidal-hifi2",
});
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 Number(toMicroseconds($tidalState.getState().currentTrack?.current ?? 0));
return 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;
getPosition(): number | bigint;
seeked(): void;
getTrackIndex(trackId: number): number;
getTrack(trackId: number): string;