Fixed timestamp & duration of scrobble. 100% playback automatically scrobbles the song.
This commit is contained in:
@ -23,7 +23,7 @@ class MalojaScrobbler {
|
||||
return this.#config.name;
|
||||
}
|
||||
|
||||
async scrobble(song, progress, start) {
|
||||
async scrobble(song, duration, start) {
|
||||
const url = new URL(this.#config.url);
|
||||
url.pathname += "/apis/mlj_1/newscrobble";
|
||||
url.search = "?key=" + this.#config.token;
|
||||
@ -31,9 +31,9 @@ class MalojaScrobbler {
|
||||
title: song.name,
|
||||
album: song.album,
|
||||
artists: song.artists,
|
||||
duration: Math.round(progress / 1000),
|
||||
duration: Math.round(duration / 1000),
|
||||
length: Math.round(song.duration / 1000),
|
||||
//time: start
|
||||
time: Math.round(start / 1000)
|
||||
});
|
||||
|
||||
this.#counter++;
|
||||
|
Reference in New Issue
Block a user