Feature #713

Add optional "url_helper" script (config file option) for playing streams that need "help" to play

Added by Jim Turner 11 months ago. Updated 11 months ago.

Target version:
Start date:
March 20, 2017
Due date:
% Done:


Estimated time:
Affects version:


Let's try this again! I requested (rejected) Feature# 698 to add ability to play "" streams using a "helper" script. I've REVISED this to make it completely general (as opposed to special request for "random website" 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/ along with a link to my current "contrib" script that shows how the user can modify to his own desire.

It currently handles, (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>



playlist-files.diff (3.24 KB) playlist-files.diff Jim Turner, March 20, 2017 20:07 (106 Bytes) diff -u Jim Turner, March 22, 2017 04:34 (7.25 KB) Latest Fauxdacious version Jim Turner, March 22, 2017 04:34


#1 Updated by John Lindgren 11 months ago

Please use unified diff format. It's not easy to see what you changed without context.

#2 Updated by John Lindgren 11 months ago

  • Status changed from New to Rejected
system ((const char *) str_concat ({url_helper, " ", filename, " ", aud_get_path (AudPath::UserDir)}));
Hell no. Executing of a system call with unsanitized, unquoted, unescaped user input screams security hole.

#3 Updated by Jim Turner 11 months ago

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!



Also available in: Atom PDF