Closed excid3 closed 1 year ago
I'll +1 that
Are you looking to scrobble the tracks you're listening to, or do you want some other Last.fm functionality?
Just scrobbling is all. I love that functionality from TT.fm Extended, don't really need anything else since linking to the track on last.fm is builtin to TT.
I'm not familiar with how to setup scrobbling, otherwise I'd have submitted with a pull request.
I'm not familiar with the Last.fm API -- I'll try to take a look at it tonight to figure out what this would require.
A quick search turned up https://github.com/clifff/javascript-last.fm-api. It seems like it wouldn't be too hard to set up a scrobble call after ~1/2 a song or so. @excid3, if you have the bandwidth it wouldn't hurt to fork and try to implement :)
Unfortunately the readme says "Scrobbling is not yet supported.". :disappointed:
Curious. I picked that fork because there was a commit that referenced scrobbling:
https://github.com/clifff/javascript-last.fm-api/commit/9f917eec2800ecd97adf5c4e2c9ff557a53c90c6
Yeah, looking at the source seems like it supports scrobbling. Maybe the readme just needs updating. I'll see if I can take a look sometime this weekend.
Also can check out the source for tt-extended https://github.com/MarkReeder/Turntable.fm-Extensions and how they do it.
Again, thanks for checking into this!
Well it's definitely doable. The only problem is that I'm pretty not very good at javascript. :smile:
The code in the javascript API is writing an iframe that makes the POST request to submit the scrobble. If I'm understanding correctly...that's causing this:
Error during tabs.executeScript: Cannot access contents of url "data:text/html,chromewebdata". Extension manifest must request permission to access this host.
but when the scrobble happens, I'm also getting a 403 forbidden to http://ws.audioscrobbler.com/2.0/ which is the Lastfm API.
Any ideas on what I should be looking at?
The only thing I'm missing from this is last.fm support. Turntable.fm Extended does a nice job of this, but it'd be great if that functionality was also included in ttplus.