Include Scrobble

This commit is contained in:
Neshura 2024-04-22 20:08:08 +02:00
parent 6a7ba60ca9
commit a99e12c6e6
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -144,9 +144,17 @@
duration = currentSong.source.duration; duration = currentSong.source.duration;
}; };
source.onplay = () => { currentSong.source.onplay = () => {
source.volume = volume; currentSong.source.volume = volume;
isPaused = source.paused; isPaused = currentSong.source.paused;
let time: number = Date.now();
let parameters = [
{ parameter: "id", value: song.id },
{ parameter: "time", value: time},
{ parameter: "submission", value: false}
];
console.warn("Scrobble is disabled");
OpenSubsonic.get("scrobble", parameters);
} }
currentSong.source.onpause = () => { currentSong.source.onpause = () => {