segler-alex / radiobrowser-api-rust

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

Check for Supported Redirects? #144

Closed Dealman closed 2 years ago

Dealman commented 2 years ago

Been working on a website which uses this API for a while and have come to the conclusion that using proxy to stream radios that aren't hosted on a secure domain is unfeasible both in terms of bandwidth and security for the end-user.

The API has a filter, is_https but this seems rather useless as it merely checks if the URL/URL_Resolved contains HTTPS. Whereas hundreds if not thousands of stations does in fact work if simply redirected to HTTPS.

To use this API and then make a GET request on each and every search result to see if it supports redirection seems rather inefficient.

I'll admit I don't know how the database or the API is structured, but would it be possible for a script to be ran whenever a station is added or once every week or so that does this and changes the is_https flag?

I think this would make the is_https flag actually useful and would yield a lot more results since during my testing it cuts out roughly 80% of all the results.

segler-alex commented 2 years ago

this is a duplicate of #135