AlexandrePTJ / mopidy-somafm

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

Refactor/fork to mopidy-channels and support more online radio stations #23

Closed PanderMusubi closed 8 years ago

PanderMusubi commented 8 years ago

Dear Alexandre,

I have, with the permission of SomaFM, reverse engineered the format of channels.xml and channels.json into https://github.com/PanderMusubi/online-radio-channels By doing that getting proper insight into this format and enabling more online radio stations to use it.

One of them is Intergalactic FM. With permission I made a fork from https://github.com/Oderik/xbmc-somafm to create https://github.com/PanderMusubi/plugin.audio.intergalacticfm with its own branding etc. which is in the default plugin repository of Kodi at the moment.

For Mopidy I would like to do something similar. Meanwhile I have also seen another radio station picking up on this format too. However, I think a fork here is a bit too much and I think it is better solved in another way so not each radio station is going to fork this project.

What do you think of refactoring or forking this project to, for example, mopidy-channels where via Mopidy configuration the you can add URLs to all the channel.xml files you would like to get added. The config could look something like:

[channels]
encoding = aac
quality = highest
urls=https://somafm.com/channels.xml;https://intergalacticfm.com/channels.xml

or

[channels]
name_somafm = SomaFM
encoding_somafm = aacp
quality_somafm = highest
url_somafm=https://somafm.com/channels.xml
name_intergalacticfm = Intergalactic FM
encoding_intergalacticfm = aac
quality_intergalacticfm = highest
url_intergalacticfm=https://intergalacticfm.com/channels.xml

Best,

Pander

adamcik commented 8 years ago

Reminds me of https://github.com/nilicule/mopidy-audioaddict/issues/1 - but even more so of https://github.com/tkem/mopidy-podcast which serves the same type of generic role.

As for the URLs variant you probably want https://docs.mopidy.com/en/latest/api/config/#mopidy.config.types.List And as for the second variant I think

[channels:somafm]
...
[channels:intergalaticfm]
...

would be nicer than the sample you gave, but we would need to add support for that in Mopidy itself.

Personally my only "concern" would be that mopidy-channels is a bit generic, but I don't have any better suggestions to be honest. But all in all this looks like a cool idea and a great way to easily add more radios :-)

PanderMusubi commented 8 years ago

It can be a working title until a better name shows up. Would extending and refactoring to this need to be done in a separate repository?

AlexandrePTJ commented 8 years ago

I do prefer format @adamcik is talking about. It allows each radio channels to have its own specific configuration.

Also mopidy-channels it not really clear. Maybe something like mopidy-generic-radio or mopidy-online-radios...

Then, yes this work should be done in a separate repository. Let me know I you need help.