kingosticks / mopidy-tunein

Mopidy extension for playing music from tunein
Apache License 2.0
65 stars 14 forks source link

Add option to specify stream formats when searching, search all forma… #52

Open olszewst opened 2 years ago

olszewst commented 2 years ago

TuneIn search API accepts an argument called formats where caller can specify what stream formats it supports. If a stream is not available in any of the requested formats, API call only does not return such stream (the response only contains a placeholder that says "Unsupported stream format").

This PR adds an option to explicitly specify what formats should be included in the response. It also changes the default behavior: queries will now by default request all formats (formats=*) instead of leaving this option blank that yields only streams in formats that TuneIn picked as default.

I believe this PR should fix https://github.com/kingosticks/mopidy-tunein/issues/50, but I didn't verify this. It did help me another stream that I had exactly the same problem with.