Open chrismou opened 8 years ago
Just circling back on this - did you look into this any more?
Sort of - we store the currently playing track in a variable, so that when the next song starts it can scrobble the previous song to last.fm. Hitting the thumbs up just submits whatever's in that those variables. At the time I was struggling to puzzle out a solution. The problem is because Radiant is just a wrapper and there are multiple places you can thumb up a song, I couldn't think of a generic way of capturing what song you've actually just liked so you can reliably submit it.
I think we can close this as gmusic.js is only listening to the main thumbs up buttons now - can you confirm?
It still doesn't work as expected, but I'm not sure of a good to the underlying problem. If I click any thumbs up button, I expect it to submit it to last.fm (if that option is on). If I click a thumbs up next to a song, say, halfway down a playlist, previously we submitted the wrong song, now it'll only submit if I click the thumb up button next to the song that's currently playing, otherwise it won't submit anything.
To properly catch every single thumb up/down, gmusic.js would need a watcher for every page/section where the thumbs could be, so we can target the correct css selector to grab the song/artist/album name for the song you just thumbed up before we submit it to last.fm.
Not sure if I explained that right. But yeah, not sure there's an easy fix this.
Oh, I see - you want to to scrobble any thumbs up. Yeah, that would have to be integrated into gmusic.js.
Well, like any thumbs up :)
I guess if there was just a way of returning the context of the page you'd clicked it on - artist, album, playlist, now playing list, etc - we could use that to target the right selectors. But yeah, that'd best placed in gmusic.js
I've noticed that hitting thumbsup next to a track seems to submit the current playing track to last.fm, rather than the song you actually liked.
I'd not noticed this before, but since the last.fm rebuild a bug in the api seems to be allowing duplicate loved tracks (which then subsequently all disappear when you delete one of them).
I've filed a bug with last.fm to fix the dupe issue, but I assume the issue with the wrong track being submitted is a problem at Radiant's end.