Please add type = "Dir" in the station-favorites database.json
tackin opened this issue · 5 comments
Hi!
In the radiolist we have the type: "radio" and "nextcloud"
We could use/need also: "Dir" (Directroy).
With that it is possible to browse through other external directrories like with this link:
http://shim-sec.wifiradiofrontier.com/vtuner/radios/country/8777677923440934?&startItems=1&endItems=100
And this Item-link is only usable for the radio if it's transmitted with type <ItemType>Dir</ItemType>
As long as Type is "Station" it will not be able to follow that item-link.
With that we would be able to browse the open frontier-database without a login or an account.
You can then add any new radiostation from this list to the internal radiopresets if a radio supports internal presets like mine.
The also given Bookmark link in the dir-listing is somehow useless but the station would play from the internal stored preset-url.
I guess there is not much to change in the code to make that fly.
Greetings!
Hi!
That sounds like a great idea, but I assume that it might not be as easy as it looks.
Adding a „Dir“ which links to wifiradiofrontier.com
would be easy, but the radio does a search request using the id of the station before playing the station.
These search requests are always against a fixed url and need to be answered by Radio-API correctly, which then needs to distinguish between external stations from wifiradiofrontier.com
and local stations from Radio API. This would then also imply to proxy wifiradiofrontier.com
.
It might be also difficult to set up the DNS redirects correctly, as some subdomains of wifiradiofrontier.com
need to be tampered and others not.
In addition, it might (mostly will) not comply with the terms of use by Frontier Silicon to „include“ their service, however a possibility to „include“ another Radio-API server would be interesting too and a similar feature.
I will think about the feature and the possibilities to implement.
To overcome all this problems I thought of including another and free source of stations as mentioned in #14.
I'm might got it wrong but ...
I only redirect the subdomain dual.wifiradiofrontier.com
All other Subdomains resolve to the original hosts
Simply clicking/calling a link is never a matter of a term of use by any companie. If so, i.e. regionalrestrictions, the host has the possibility to refuse the request by a given MAC or given IP, not given Cockie or whatever in the request.
And btw. all our radios used Frontier-services total legaly. They where build to use it.
I put in: http://shim-pri.wifiradiofrontier.com/vtuner/radio/4311968431808055/play/de_4_dual12?
as a station-link in your GUI and called it in the radio. It played. I inserted that request in the radio-presets and it playes as well.
The dir call to: http://shim-sec.wifiradiofrontier.com/vtuner/radios/country/8777677923440934?&startItems=1&endItems=100
works with any appended "$mac=xxxxxxxxxxxx" in the link and therefore should be answerd to the radio as to my browser.
If you follow the dir link in the radio, you end up in a
http://shim-sec.wifiradiofrontier.com/vtuner/radios/country/8777677923440934?&startItems=1&endItems=100&mac=12345
you find:
<Item> <ItemType>Dir</ItemType> <Title>Popular stations</Title> <UrlDir>http://shim-sec.wifiradiofrontier.com/vtuner/radios/place:8777677923440934;popular?</UrlDir> <UrlDirBackUp>http://shim-pri.wifiradiofrontier.com/vtuner/radios/place:8777677923440934;popular?</UrlDirBackUp> </Item>
Following
http://shim-sec.wifiradiofrontier.com/vtuner/radios/place:8777677923440934;popular?mac=12345
(with the radio-appended "&mac=xxxxxx" you get)
<Item> <ItemType>Dir</ItemType> <Title>SWR3</Title> <UrlDir>http://shim-sec.wifiradiofrontier.com/vtuner/radios/place:8777677923440934;popular/4311968431808055?</UrlDir> <UrlDirBackUp>http://shim-pri.wifiradiofrontier.com/vtuner/radios/place:8777677923440934;popular/4311968431808055?</UrlDirBackUp> </Item>
Following this with:
http://shim-sec.wifiradiofrontier.com/vtuner/radios/place:8777677923440934;popular/4311968431808055?mac=12345
gets you
<Item> <ItemType>Station</ItemType> <StationId>4311968431808055</StationId> <StationName>SWR3</StationName> <StationUrl>http://shim-sec.wifiradiofrontier.com/vtuner/radio/4311968431808055/play/de_1__?</StationUrl> <StationDesc>Euer Pop-Radio Nummer 1 bringt euch aktuelle Nachrichten, Verkehr, Wetter, Comedy, Webradio, Gewinnspiele, Promi-News und Veranstaltungstipps.</StationDesc> <StationFormat>Local-Regional News, Pop</StationFormat> <StationLocation>Germany > Baden-Baden</StationLocation> <Logo>http://airableassets-cdn.wifiradiofrontier.com/png@150x150/43/11/968431808055.png</Logo> <StationBandWidth>128</StationBandWidth> <StationMime>MP3</StationMime> <Relia>5</Relia> <Bookmark>http://shim-sec.wifiradiofrontier.com/vtuner/favorites/radio/4311968431808055/create?</Bookmark> </Item>
and http://shim-sec.wifiradiofrontier.com/vtuner/radio/4311968431808055/play/de_1__?mac=12345
finally returns the m3u stream-link. ... and can be bookmarked in presets.
My guess was, it therefore should also work in the radio. But I might be wrong.
Uhhh! I missed some pakets in a tcp-dump in one interface.
The Pre-request of a radiopreset is:
http://dual.wifiradiofrontier.com/setupapp/dual/asp/BrowseXML/Search.asp?sSearchtype=3&Search=1001&mac=xxxxxxxx&dlang=eng&fver=4&ven=dual12
and not the used streamlink. .... Damn
Now I got your point!