diff --git a/rules/predefined/krateng_artistsingroups.tsv b/rules/predefined/krateng_artistsingroups.tsv index cf49b84..b60045f 100644 --- a/rules/predefined/krateng_artistsingroups.tsv +++ b/rules/predefined/krateng_artistsingroups.tsv @@ -10,6 +10,3 @@ countas RenoakRhythm Approaching Nirvana countas Shirley Manson Garbage countas Lewis Brindley The Yogscast countas Sips The Yogscast -countas Jennie BLACKPINK -countas Junghwa EXID -countas Hwasa Mamamoo diff --git a/rules/predefined/krateng_kpopgirlgroups.tsv b/rules/predefined/krateng_kpopgirlgroups.tsv index 3cd8be2..ec074cb 100644 --- a/rules/predefined/krateng_kpopgirlgroups.tsv +++ b/rules/predefined/krateng_kpopgirlgroups.tsv @@ -19,6 +19,7 @@ replaceartist 4minute 4Minute replacetitle 미쳐 Crazy # BLACKPINK +countas Jennie BLACKPINK replacetitle AS IF IT'S YOUR LAST As If It's Your Last replacetitle BOOMBAYAH Boombayah replacetitle WHISTLE Whistle @@ -62,6 +63,9 @@ replacetitle RBB (Really Bad Boy) Really Bad Boy # EXID countas Dasoni EXID +countas Junghwa EXID +countas Hani EXID +countas LE EXID replacetitle HOT PINK Hot Pink replacetitle AH YEAH Ah Yeah replacetitle WHOZ THAT GIRL Whoz that girl @@ -91,6 +95,7 @@ replacetitle I'll be yours I'll Be Yours replacetitle FEMALE PRESIDENT(여자 대통령) Female President # Mamamoo +countas Hwasa Mamamoo replaceartist Hwa Sa Hwasa replaceartist MAMAMOO Mamamoo replacetitle Egotistic(너나 해) Egotistic diff --git a/scrobblers/chromium-generic/background.js b/scrobblers/chromium-generic/background.js index 71b896e..fbaceb7 100644 --- a/scrobblers/chromium-generic/background.js +++ b/scrobblers/chromium-generic/background.js @@ -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); diff --git a/scrobblers/chromium-generic/sitescripts/plex.js b/scrobblers/chromium-generic/sitescripts/plex.js index d4fcfd1..42e6ac8 100644 --- a/scrobblers/chromium-generic/sitescripts/plex.js +++ b/scrobblers/chromium-generic/sitescripts/plex.js @@ -1,7 +1,7 @@ bar = document.querySelector("div[class*=PlayerControls]") if (bar == null) { console.log("Nothing playing right now!") - chrome.runtime.sendMessage({type:"stopPlayback",artist:"",title:""}) + chrome.runtime.sendMessage({type:"stopPlayback",time:Math.floor(Date.now()),artist:"",title:""}) exit() } @@ -21,18 +21,11 @@ else { control = bar.querySelector("div[class*=PlayerControls-buttonGroupCenter] > button:nth-child(2)").getAttribute("title") if (control == "Play") { console.log("Not playing right now") - chrome.runtime.sendMessage({type:"stopPlayback",artist:artist,title:title}) + chrome.runtime.sendMessage({type:"stopPlayback",time:Math.floor(Date.now()),artist:artist,title:title}) //stopPlayback() } else if (control == "Pause") { console.log("Playing " + artist + " - " + title) - chrome.runtime.sendMessage({type:"startPlayback",artist:artist,title:title,duration:durationSeconds}) + chrome.runtime.sendMessage({type:"startPlayback",time:Math.floor(Date.now()),artist:artist,title:title,duration:durationSeconds}) //startPlayback(artist,title,durationSeconds) } - - - - - - - diff --git a/scrobblers/chromium-generic/sitescripts/ytmusic.js b/scrobblers/chromium-generic/sitescripts/ytmusic.js index b4e9a68..d3bfc49 100644 --- a/scrobblers/chromium-generic/sitescripts/ytmusic.js +++ b/scrobblers/chromium-generic/sitescripts/ytmusic.js @@ -1,7 +1,7 @@ bar = document.querySelector("ytmusic-player-bar") if (bar == null) { console.log("Nothing playing right now!") - chrome.runtime.sendMessage({type:"stopPlayback",artist:"",title:""}) + chrome.runtime.sendMessage({type:"stopPlayback",time:Math.floor(Date.now()),artist:"",title:""}) exit() } @@ -23,18 +23,11 @@ else { control = ctrl.querySelector("div > paper-icon-button[class*=play-pause-button]").getAttribute("title") if (control == "Play") { console.log("Not playing right now") - chrome.runtime.sendMessage({type:"stopPlayback",artist:artist,title:title}) + chrome.runtime.sendMessage({type:"stopPlayback",time:Math.floor(Date.now()),artist:artist,title:title}) //stopPlayback() } else if (control == "Pause") { console.log("Playing " + artist + " - " + title) - chrome.runtime.sendMessage({type:"startPlayback",artist:artist,title:title,duration:durationSeconds}) + chrome.runtime.sendMessage({type:"startPlayback",time:Math.floor(Date.now()),artist:artist,title:title,duration:durationSeconds}) //startPlayback(artist,title,durationSeconds) } - - - - - - -