Ideally I would like place "[URL]" in flashgot's download manager command line arguments template, so mplayer gets called like this:
Code: Select all
mplayer "[URL]"
(for some reason bash breaks the string at every '&' character in the URL, and youtube URLs have a lot of '&' in them).
Unfortunately flashgot prevents the user typing in quotes, so a shell script is needed to do the job.
But if I try:
Code: Select all
#!/bin/bash
mplayer "$1"
Given the solution to the above, there is still some work to do - the URL contains a comment string near its end, beginning with '#'. The # and all what follows it needs to be stripped off, otherwise mplayer complains. Something like sed ought to be able to do this.