Open zimensky opened 6 years ago
So, I've
Play
on first trackI've listened to first track, then second track begin to play and duration
was off first track.
And also I've got a missing scrobble of a track which actual duration is less than a sent duration value.
GooglePlay tab won't render any track time relative updates to HTML if it's not the active tab. So if you rely on track duration and its current position this data won't be updated with a new track playing.
Active tab as in currently in focus? I usually have the music tab running in the background and seems to scrobble as expected. I'll look into this this weekend.
Yes, active tab as in currently in focus.
I've just tried to make an extension that checks an info about currently playing song on Google Pay and discovered that a song time only being updated if Google Play tab's in focus. As soon as you switch to another tab time numbers stop being updated (in DOM, I mean, both in the track progress/duration block and the progress bar attributes data). Although a song title and an artist DOM elements being updated right away on a song change.
You can also check it via your extension: just watch the XHR requests on updateNowPlaying
in the extension's background script — when not on the Google Play tab for all the songs there will be "frozen" duration of a track, which were playing while you were on the Google Play tab.
By the way, I've discovered that there's no any problems with scrobbling if you keep Google Play in a single tab in a separate Chrome window. That way the tab is always stays active (even if the window is not) and updates all necessary data in the DOM.
Recently I've noticed that some tracks doesn't scrobble. I've started to look up what data's been sent and found that somehow
updateNowPlaying
sentsduration
of a previously played track. Sometimes tracks been scrobbled OK, but sometimes they're not.Possible cause of missing scrobbles although I can't reproduce it 100%.
Plugin version:
1.7.0
Examples
Please, take a look at tracks duration — each time
updateNowPlaying
sents duration of previous track:Summer Montage
Actual duration:
124
(2:04) Sent duration:257
(4:17)City Of Stars
Actual duration:
149
(2:29) Sent duration:124
(2:04)