radiobrowser-api-rust icon indicating copy to clipboard operation
radiobrowser-api-rust copied to clipboard

Empty country, tag, language (etc?) produce results but are hidden from summary list

Open ceever opened this issue 4 years ago • 4 comments

https://de1.api.radio-browser.info/xml/stations/bycountryexact/ https://de1.api.radio-browser.info/xml/stations/bytagexact/ https://de1.api.radio-browser.info/xml/stations/bylanguageexact/

... produce results (besides bad xml with special characters), but the "" (empty) options are not listed under: https://de1.api.radio-browser.info/xml/countries/ https://de1.api.radio-browser.info/xml/tags/ https://de1.api.radio-browser.info/xml/languages/

There should be a line for each like: <tag name="" stationcount="2397"></tag>

Cheers

ceever avatar Dec 13 '20 15:12 ceever

in the case of tags i would say the current behaviour is correct, because you either have a tag or multiple or you don't have one. it is not correct to say you have an empty tag, because tags is a list/vector, it can be empty. empty means that it is not connected to any tag which is what should be conveyed to the user.

languages is also a field that is a list/vector which means it should work the same way as tags.

but with country i am unsure. a station can be linked to a country, or it is not linked to a country. hmmm

what do you want to acomplish? i would suspect you want to show a list of stations that do not have a tag/language/country set for example?

segler-alex avatar Apr 22 '21 16:04 segler-alex

Sure, I understand your point. An empty tag is not something that necessarily belongs into these lists.

However, I discovered this by accident. I.e. other people would just query https://de1.api.radio-browser.info/xml/countries/ ... and not think of the empty cases and missing a large amount of stations when consequently using the possibilities on https://de1.api.radio-browser.info/xml/stations/bycountryexact/ ... it is not documented anywhere that the empty case is a possibility as well, is it? Hence, I thought it would be a good idea to show developers that the empty case can also be used when querying the various stations based on country, tag and language. Also, empty country, tag and languages bring up different results. Furthermore, these are lists that give the amount of the different cases, however not the amount of the empty case. What is the amount of empty countries, empty tag or empty languages? These are the links were I would exptect and extract this information, wouldn't I?

Of course my way to think about it, might be not the way most people see it. I just wanted to prevent other developers to forget about these cases and only showing parts of possible stations to the user.

Many thanks

ceever avatar Apr 27 '21 12:04 ceever

Btw. I already sent you the code via email: https://github.com/ceever/Radio-Browser.info.lua

Maybe you want to link it on the Software page of radio-browser.info ... :-)

ceever avatar Apr 27 '21 12:04 ceever

thank you for your work, i added your vlc plugin to the new freshly deployed website

segler-alex avatar Apr 29 '21 23:04 segler-alex