segler-alex / radiobrowser-api-rust

radio-browser API implementation in rust
GNU Affero General Public License v3.0
234 stars 104 forks source link

Multiple steams per station #149

Closed NerfBro closed 2 years ago

NerfBro commented 2 years ago

Some radio stations have multiple streams available to them. What is the best practice way of putting them all together under a single name? Is there any way to collapse them together into a single array of streams for that station? Is there a clever search I could do on a single parameter to isolate them? Is there something simple and obvious that I’ve missed?

segler-alex commented 2 years ago

Currently, there is no way to merge streams. Every stream stands for its own. This was a design decision and would need a major rewrite to change. For the time being, I do not have time to do such an undertaking. It would also change how stations would be added to the database, it would need editing functionality for streams (sometimes single streams change to a station but others don't). Sometimes new ones have to be added to a "stream group" of a station. This would also change the API as a whole to embrace the idea fully.

If you have any ideas on how to do this technically without a rewrite, feel free to reply.

NerfBro commented 2 years ago

To minimise disruption and redesign I would propose that streams for the same radio station share the same station name. I think this is already possible because the IDs for each stream are already unique. It’s just needs to be made the best practice when adding new stations.

In the meantime I will try grouping them together using the homepage url/domain of the station and/or the link to the station icon. Are you able to tell me if I can do a search on homepage URLs?

Many thanks.