radiola icon indicating copy to clipboard operation
radiola copied to clipboard

Add Scrobbling support

Open jbwharris opened this issue 2 years ago • 2 comments

I see your app has a song history, is there any reason that scrobbling support couldn't be added for last.fm?

jbwharris avatar Oct 14 '23 17:10 jbwharris

I don't think it's going to be complicated, so I guess I'll add it a little later.

SokoloffA avatar Oct 22 '23 18:10 SokoloffA

@SokoloffA That's awesome. I do have some experience with scrobblers, in that I do contribute sometimes to Web Scrobble from time-to-time. I was messing around with a few streams I listen to and thought it worth flagging some shortcomings I see when it comes to scrobbling.

image

Issues

  1. With the Foo Fighters and Weeknd tracks, you can see that they are all uppercase coming from Indie88
  2. You can see a couple of gobbledygook entries from KEXP, KEXP Streamguys and Indie88 (where it says just true)
  3. The KEXP entries you can see the artist is listed first, then with the Indie88 entries you can see the song title is first. Sending this to lastfm would result in a messed up scrobble, as the Indie88 one is backwards and would need to be manually flipped.

Possible Solutions

  1. Web Scrobbler does have this project called Metadata Filter that handles a lot of the sanitizing of scrobbles for that extension and can be used in other projects. So I'm wondering if you could use that tool as a means to clean up some of the cruft that might come through from streams. It would fix the capitalization issue there, as well as potential common junk like where a station much have (2012 Remaster) in there.
  2. I'm not quite sure if the filter would automatically reject those random strings, or the true entry, but it's possible it would. If not, then maybe only accept history entries if say they're at least 30-45 seconds long instead of just immediately adding them to the history. In my experience usually those things are only present for a few seconds before the player loads the proper metadata.
  3. I don't believe the Metadata Filter would fix the inverted streams issue. What I'd propose is being able to have a boolean toggle per added stream that would invert the artist and song title on per case basis.

If you need any help testing or additional feedback, just let me know. I'm keen to help where I can.

jbwharris avatar Oct 22 '23 23:10 jbwharris

I started reading the scrobbling documentation. It looks like the way their authentication workflow works is that each track needs to be scrobbled using the app developer's private key.

So that means either we need to publish the private key inside of the app // asking about that here https://github.com/tfmart/ScrobbleKit/issues/9

Or we need to set up a web service that holds our private key and then requires every customer of this Radiola app to phone home each time that they play any song so that we can sign the request and send it off.


These both sound pretty dumb. Can you please help me understand how this works?

fulldecent avatar Dec 07 '25 03:12 fulldecent