AlexandrePTJ / mopidy-somafm

Provides a backend for playing music from somafm
MIT License
22 stars 9 forks source link

Show real artist/song name in Now Playing #13

Closed celeryclub closed 9 years ago

celeryclub commented 9 years ago

It would be nice to see the real artist and song name instead of the DJ and station name. I know the data is in http://api.somafm.com/channels.xml (lastPlaying node), so maybe it would make sense to pull it out of there. Does mopidy have a hook that could be used to refresh that file every time the song changes?

And by the way, I'd be glad to try the coding myself. Just wanted to make sure you think it's a good idea.

AlexandrePTJ commented 9 years ago

Thanks for your suggestion. I think it is not a good idea to poll for songs changes in channels.xml. Stream from somafm's radios contains ICY-Metadata. As it is pretty common for all icecast based radios, it should the audio module from mopidy to decode this and send and event about it.

I think there is (or were) issues opened in mopidy side, but I am not sure.

celeryclub commented 9 years ago

Thanks for the reply. That makes sense - I didn't know about ICY. I found this issue here, which looks related: https://github.com/mopidy/mopidy/issues/263. Do you this is something that cannot be implemented in your library until mopidy has additional API support?

adamcik commented 9 years ago

One of the audio related improvements I've gotten in recently is collecting the metadata changes from sources such as ICY and making it available to AudioListeners. In other words mopidy's core now knows about these track updates, but we still need to expose them to frontends.

AlexandrePTJ commented 9 years ago

So I will not set this in somafm extension. However if you (@adamcik) know how you want it to be exposed to frontends, I can help.

adamcik commented 9 years ago

https://github.com/mopidy/mopidy/issues/270 is the relevant issue. I'm adding a list of outstanding items covering what I have planed out so far with regards to this.