i apologize in advance for offering a workaround instead of a solution.
but consider this:
use the power of youtube-dl (which can download a lot more than just youtube videos, and also soundcloud and all sorts of media from the web)!
this is how i do it:
- install the Open with... addon
- add a new item for youtube-dl
optionally you can also add mpv media player, which can play online videos directly with the help of youtube-dl. i think mplayer also has that ability.
now, you can right-click any link and choose to open with youtube-dl.
by default it will download to your $HOME; a small wrapper script can help there.
i have several wrapper scripts, one for downloading music to dedicated directories, another one to download videos in medium resolution suitable for my netbook, etc. etc.
i hope this helps.