by ZoomZoomZoom · 5y ago · 0 comments
I already have software which downloads anything I want fast, the issue is, I can't simply connect it to Firefox anymore. Same goes to using external players to view media (I need more nuanced control over rate and pitch of the playback).
I understand it's done in the name of security, but I refuse to accept there's no practical way to allow user to launch software on his own machine from the browser without some auxiliary intermediate program which some older extensions suggested as a way to continue working.
Sorry for the rant.
But it is possible. I have made my own little addon that calls yt-dlp (previously youtube-dl) with the current URL to save videos from YouTube and other supported places (e.g. Reddit) with a single click. The addon communicates with a Python program to send it the current page's URL which in turn just changes to a predefined directory (where downloaded videos are stored) and calls yt-dlp with that URL.
I was a bit hesitant at first to bother with all that but eventually i decided that it is "my browser" so i should be able to do whatever i want with it and certainly adding a button to call a program with the current URL should be more than possible.
The downside is that Developer Edition updates way more often than regular Firefox which in theory might break stuff but personally i never had an issue with it.
I do not like the whole signing thing - just like i do not need to sign any -say- Emacs scripts i write, i shouldn't need to sign any browser scripts. Also last time i checked i need to register with Mozilla for this to work and i especially do not want to have some 3rd party's permission so that i can install my own scripts on my own browser. I might have misunderstood that last part but i didn't see much of a reason to bother when i could jus ignore the entire thing with the Developer Edition.
Finally this seems to need npm, node.js, etc to work and i do not want to bother with these things. All i did to make my addon was to use a text editor, make 2-3 files and done. Well, and use regedit but whatever...
The second one needs the "native client" which I mentioned above. It uses effing python to pass the link from the browser to the player! It's a workaround and an ugly complication. The more I use technology the more I come to despise those levels of software strata solving the problem the lower layers introduced for disputable reasons.
Yeah, it's unfortunate that it needs the Python (or Ruby) script as a shim to MPV. But it's not an inherent requirement: the extension could execute MPV directly if MPV understood the weird length-prefixed JSON protocol that Firefox and Chrome use.
The aria2 one didn't have an update since 2019 though.
I imagine a browser extensions that adds deep-links for certain media to be opened in external software is possible. Just needs coordination with the app...