Closed cheshire137 closed 6 years ago
I got an SSL error trying to get the current track from https://api.somascrobbler.com/api/v1/nowplaying/suburbsofgoa. https://somascrobbler.com/ is still up but the API it links to, http://api.somascrobbler.com/, also doesn't load.
Just for the record, SomaFM would prefer you donโt scrobble this. Last.FM is owned by CBS who uses that data for their own streaming. Not to mention CBS has been really harmful to indie broadcasters like SomaFM. We have had to send them cease and desists in the past for cloning our channels and using our names. Really uncool of them.
We have had to send them cease and desists in the past for cloning our channels and using our names.
That is really shitty. ๐
The thing stopping scrobbling from working seems to be the extension not knowing what song is currently being played. Even if scrobbling support is not restored, it would be ideal to see the current song or at least recently played songs on the active station. If the SomaScrobbler API remains down, I could do in this extension what I do in my standalone Electron app, which is pull the list of recent songs from api.somafm.com:
Just to note, I think it would be especially crappy to switch to using SomaFM's own API to get data and then use that data in a way SomaFM explicitly doesn't like. I think what I'll end up doing is dropping the dependency on the SomaScrobbler API and making this extension like HuxleyFM in that it a) doesn't scrobble to Last.fm, b) gets its track data from the SomaFM API, and c) shows a list of the recent tracks from a station instead of showing one track that's currently playing.
Just chiming in to add that I also think it is awful how LastFM/CBS has affected SomaFM and I think it is a good decision to support @rustyhodge and SomaFM based on your decision to remove scrobbling. The LastFM API has been on life support for a while anyways, right?
PS: Thanks for the hard work keeping this extension up to date. :100:
The LastFM API has been on life support for a while
That's been my impression when I've gone to the Last.fm API page the last few times, yeah. I remember there was some trouble getting API keys I'd generated in the past.
Would it simplify things if I could give you a JSON or XML file that has only the currently playing song (and possible the time it started playing at)?
Thank you for the offer! Getting the recent tracks list per station is pretty easy using the endpoint that already exists, and it already includes a timestamp:
{
"id": "poptron",
"songs":[
{
"title": "Frequent Flyer",
"artist": "Chromeo",
"album": "White Women",
"albumart": "",
"date": "1517442748"
},
-- http://api.somafm.com/songs/poptron.json
I could see the duration of each track, if that's known, being added to this endpoint โ๏ธ. From the duration + the timestamp, I could determine if a track is still playing or not.
If durations for tracks aren't known, then an endpoint that has just the current song in a station would be useful, or if the track with the most recent date
in the existing /songs/[channel].json endpoint is definitely the currently playing track, then I could use that knowledge.
What could be interesting, and maybe this is the format you were thinking instead of a separate endpoint per station, would be a single endpoint with a list of all the stations and the active song on each. Then in the extension, in addition to the station name, I could also list the song that's playing. That could help a user choose which station they want to listen to, especially if they recognize the song/artist being played.
It's up to you! I think the extension would be just fine using existing SomaFM API endpoints. ๐
I understand the problems with Last.fm. How about Libre.fm? It is a free software alternative to Last.fm. It might be worth considering to just switch services instead of dropping scrobbling support altogether. Just an idea.
From feedback in the Chrome Web Store: