New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TuneIn radio initial support #156
Conversation
Create the very first bits of a TuneIn Radio plugin for Volumio. So far it simply downloads and shows the list of available categories from TuneIn Radio. Everything else is still to be done.
Add initial (and very unclean) support for playing a radio. The "Local Radio" section now supports playing radios correctly.
Significant changes in the browsing logic, including: * Load root categories during the onStart() call, and cache results for a faster browsing * Use regexp matches to identify the 1st level of nested browsing * Generalise the former browseLocal() function to be able to handle most of L1 browsing, covering Local radios, Talk, Music and Sport * Fix the "prev" link
Start migrating the codebase to use node-tunein-radio instead of node-tunein, which is being designed with the specific purpose of supporting the required use-cases for this Volumio plugin.
The browsing logic had to be reviewed after switching to the new node-tunein-radio npm module. All main categories are now working when it comes to browsing their main content.
It looks like `albumart` needs to be used for thumbnais instead of `icon`, which is used for folder icons instead.
Implement search through TuneIn content
* Add support for 2 meta categories (Best and Popular) via configuration switches. * Break down items in each list by sub-categories
Track the history of browsing across different nested levels in order to provide a more consistent behavior when pushing the "back" button.
* Use the parsed URL from API calls to set internal routing URLs, which makes the whole logic much more generic * De-duplicate code by moving common bits into a function that will assemble the proper item to be added to the result sets
Since TuineIn uses an undefined number of nested levels with filters and so on, we need to take a generi approach while browsing for content, and trust the results from API without trying to over interpret.
The API uses uppercase characters and the ~ sign is some filters (Namely when paginating by first letter).
* Make the existing entries in UIConfig more self-explanatory. * Add a new flag for enabling/disabling experimental features to make sure people are clear on what they get. * Hide "Podcasts" behind the experimental flag.
Leverage the ability of the node-tunein-radio module to cache results. Given that the contend doesn't change so often, cache results for one hour.
Now it's possible to browse Podcasts / Shows episodes and play them properly.
@volumio is there anything else I need to do in order to get this PR reviewed? |
Hi Sergio, |
Honestly, I though about it halfway through the implementation when I noticed the similarities with the embedded What I would suggest is a 2 steps approach:
Would that work? In that case I'll open an issue soon on the Volumio repo to discuss some details about the implementation. Namely, I am unsure about how much to integrate TuneIn within the webradio section. |
Hi Sergio, |
@piffio Plugin published, very well done!
That's definetely a great start, looking forward to see your improvements ! |
Proper volatile setup, that doesn't break Volspotconnect2
This plugins adds support to TuneIn Radio streams and Podcasts.
This is my first Volumio plugin, therefore feedback is more than welcome.
The initial release is meant at providing a basic working functionality and to get early testing. I have been testing thoroughly both radio stations and podcasts, but I expect some users will get into special corner cases.
The plugin caches results from TuneIn, to avoid being blacklisted.
Ideally we should get a dedicated partnerId from TuneIn, which would increase the request quota as well as enable support for authentication and other additional features, but so far I have got no replies to my emails :(
What is supported:
What is not supported (yet?):