cheshire137 / soma-chrome

Chrome extension to listen to SomaFM web radio stations from your browser.
https://chrome.google.com/webstore/detail/somaplayer/dpcghdgbhjkihgnnbojldhjmcbieofgo?hl=en&gl=US&authuser=1
MIT License
58 stars 20 forks source link

Current track info not showing #39

Closed cheshire137 closed 6 years ago

cheshire137 commented 6 years ago

From feedback in the Chrome Web Store:

it doesn't scrobble to Last.FM.

Hey guys. Please help me with scrobbling.

I disconnected and re-authenticated Last.fm multiple times and it still doesn't scrobble. Not sure what I'm doing wrong. Also, notifications aren't showing up either.

Extension doesn't scrobble.

just started using this. won't scrobble.

Having trouble getting it to scrobble though.

cheshire137 commented 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.

api_somascrobbler_com
rustyhodge commented 6 years ago

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.

cheshire137 commented 6 years ago

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:

https://github.com/cheshire137/huxleyfm/blob/c038541b913948888f582bf803b1a5fcdd2f724d/models/soma.js#L26-L30

cheshire137 commented 6 years ago

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.

code-for-coffee commented 6 years ago

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:

cheshire137 commented 6 years ago

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.

rustyhodge commented 6 years ago

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)?

cheshire137 commented 6 years ago

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. ๐Ÿ‘Œ

m-ad commented 6 years ago

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.