Add optional "url_helper" script (config file option) for playing streams that need "help" to play
Let's try this again! I requested (rejected) Feature# 698 to add ability to play "tunein.com" streams using a "helper" script. I've REVISED this to make it completely general (as opposed to special request for "random website" tunein.com). This simply allows the user to create a script or program to handle these types of urls on his own and provide the correct url to Audacious with minimal changes to Audacious itself and no effect for the rest of Audacious users that do not create such a script. This can greatly expand Audacious's playing capabilities with only a fairly trivial code change, (As I mentioned previously, I want to continue to make maturing Fauxdacious features available for optional mainline consideration / revisions).
Attached, please find the diff for the single file changed in Audacious (libaudcore/playlist-files.cc) along with a link to my current "contrib" script that shows how the user can modify to his own desire.
It currently handles tunein.com, iheart.com (IHeartRadio), youtube, and vimeo, NOTE: This particular script does take advantage of some tagging features that would be simply ignored in mainline Audacious. The new Audacious option to use such a script/program is: [Audacious].url_helper=<path/to/script>
#3 Updated by Jim Turner 11 months ago
- File playlist-files.cc.diff playlist-files.cc.diff added
- File playlist-files.cc playlist-files.cc added
Ok. I wasn't sure if it would make sense. Pbm. is that I haven't (yet) attempted to merge your latest "playlist" commits, so I'm diffing against a slightly older Audacious version. I've also attached my latest version, which may help.
#4 Updated by John Lindgren 11 months ago
Your second diff got messed up somehow (it's only 106 bytes) but I can see the changes from the full file. Thanks.
My earlier comment was a bit brusque and I apologize for that. I do appreciate the creativity of this solution, but I don't think this change should be included in Audacious. If we were going to implement a URL "translation" feature, I would want to see it done with a proper plugin, not by hacking up libaudcore to execute some Perl script. I think it could be done by adding an isOurPlaylist() function to the PlaylistPlugin class to treat a "special" URL as a playlist, then loading that "playlist" through the normal PlaylistPlugin::load() method. I'm not saying I'd want to maintain such a plugin in-tree, but I would be okay with adding the API to support it.
#5 Updated by Jim Turner 11 months ago
Thanks John for the suggestion on how to better do this. Working on Audacious is always a big learning experience for me as I only know the "tip of the iceberg" on this thing, so everything I do is a trial and error approach for me, so I'm always open to advice from the guru. I should pbly pay a lot more attention to security as well. As a fellow techie, no pbm. - I'm pretty used to both getting and giving brusque, to the point comments. You're pretty tame compared to some of the things Linus Torvalds says among kernel devs!