mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2024-11-22 21:42:46 +01:00
Add Video support
This commit is contained in:
parent
7a30b125ec
commit
08ec7fadac
@ -21,6 +21,7 @@ const observer = (event, arg) => {
|
|||||||
const date = new Date();
|
const date = new Date();
|
||||||
let now = date.getTime() / 1000 | 0;
|
let now = date.getTime() / 1000 | 0;
|
||||||
let remaining = date.setSeconds(date.getSeconds() + (dsec - csec));
|
let remaining = date.setSeconds(date.getSeconds() + (dsec - csec));
|
||||||
|
if (mediaInfoModule.mediaInfo.url) {
|
||||||
rpc.setActivity({
|
rpc.setActivity({
|
||||||
...idleStatus,
|
...idleStatus,
|
||||||
...{
|
...{
|
||||||
@ -31,6 +32,17 @@ const observer = (event, arg) => {
|
|||||||
buttons: [{ label: "Play on Tidal", url: mediaInfoModule.mediaInfo.url }],
|
buttons: [{ label: "Play on Tidal", url: mediaInfoModule.mediaInfo.url }],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
rpc.setActivity({
|
||||||
|
...idleStatus,
|
||||||
|
...{
|
||||||
|
details: `Listening to ${mediaInfoModule.mediaInfo.title}`,
|
||||||
|
state: mediaInfoModule.mediaInfo.artist,
|
||||||
|
startTimestamp: parseInt(now),
|
||||||
|
endTimestamp: parseInt(remaining),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user