1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Scrobbler fix

This commit is contained in:
Krateng
2019-04-08 15:14:51 +02:00
parent 09d5b5c6d8
commit 0624996c73
5 changed files with 19 additions and 23 deletions

View File

@@ -130,6 +130,7 @@ class Controller {
this.alreadyScrobbled = false;
this.messageID = 0;
this.lastMessage = 0;
this.update()
}
@@ -143,6 +144,13 @@ class Controller {
// an actual update message from the script has arrived
playbackUpdate(request) {
if (request.time < self.lastMessage) {
console.log("Got message out of order, discarding!")
return
}
self.lastMessage = request.time
//console.log("Update message from our tab " + this.tabId + " (" + this.page + ")")
if (request.type == "stopPlayback" && this.currentlyPlaying) {
this.stopPlayback(request.artist,request.title);