Include Scrobble
This commit is contained in:
parent
6a7ba60ca9
commit
a99e12c6e6
1 changed files with 11 additions and 3 deletions
|
@ -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 = () => {
|
||||||
|
|
Loading…
Reference in a new issue