external-application-button
external-application-button copied to clipboard
[Question] How do I make it work with yt-dlp and with --config-locations "PATH to my config"?
I don't have a single clue even after trying to make it work for a whole hour.
My old Windows config:
Display Name: Download Video from YouTube (Windows/PowerShell)
Executable Name: wt
Arguments: -- pwsh -nologo -command "yt-dlp --ignore-errors --download-archive C:\External-Application-Button.txt --output 'C:\YouTube\%(channel)s - %(title)s.%(ext)s' ('[HREF]' -replace '&list=.+','')"
It's a bit complex, uses powershell to strip the playlist part of the URL to prevent a whole playlist being downloaded instead of a single file.
--download-archive keeps track of what was downloaded before to ensure things aren't downloaded many times.
Did you use yt-dlp as Executable Name? This won't work because yt-dlp is a console app, it will run hidden, similar as mpv runs console apps hidden.
PowerShell starts slow (250 ms), because of that I currently rewrite my command lines using Dash/Bash on Linux.
If you need something starting fast on Windows, have a look at Nushell, I recently migrated from Bash to Nushell.
@stax76 Would you mind sharing the Nushell version of the command line?
Thanks
I only have a powershell (Windows) and sh/dash (Linux) version.
gnome-terminal
--geometry 90x28+75+105 -- sh -c 'yt-dlp --ignore-errors --download-archive /someFolder/External-Application-Button.txt --output "/someFolder/YouTube/%(channel)s - %(title)s.%(ext)s" $(echo "[HREF]" | sed "s/&list=.*//")'
Thanks
If you need something starting fast on Windows, have a look at Nushell
I installed nushell and it is in PATH.
Now what?
I tried setting Executable Name as nu but it doesn't work.
these are my arguments yt-dlp [HREF] --format "bestvideo+bestaudio/best" --sub-format best --sub-langs all,-live_chat --embed-subs --embed-metadata --embed-chapters --convert-subs srt --concurrent-fragments 10 --merge-output-format mkv --sponsorblock-mark all -o 'D:\Downloads\%(title)s.%(ext)s'
Not even cmd is working with this extension.
wt works fine though.
@BhaturaGuy Just set nushell as default profile on wt. It should work
@stax76 do you or anyone else here know why I cannot get this to work with Windows Terminal using this extension? I had it working perfectly but never exported it before I was forced to do a fresh Windows install... and of course, now I can't recreate it. (Win10 Pro x64, Firefox 113.0.1 x64)
I always get a [error 2147942402 (0x80070002) when launching...] when passing ANY command to wt via cmd or pwsh, not just yt-dlp. For example, with wt as the executable name and the following arguments:
-- pwsh -nologo -command "ls"
I've tried so many variations of pwsh -c vs. cmd /c, quoting or not quoting the command going into the shell, checking or unchecking "Surround arguments with quote characters", different commands, not using -- or -nologo, etc.
Every single one of these executables is in my system %PATH% (wt, cmd, pwsh, yt-dlp) and I've done full reboots since any of that was touched so I know everything is working with the latest version of my environment. If I pass just a shell (e.g. cmd or pwsh) then it opens in wt without issue, but passing any commands to them, even extremely simple ones like dir to cmd or ls to pwsh give the same error.
Every issue I saw related to this against Terminal seemed to be related to either more basic syntax issues or stuff missing from their %PATH%; can't find anyone running it via a browser extension like this. I have it "working" by just not involving wt and using cmd as the executable and passing yt-dlp to that... but the fact that I used to have it working with Terminal and now can't recreate it is driving me nuts.
Maybe this:
https://learn.microsoft.com/en-us/windows/terminal/customize-settings/startup#default-terminal-application
Maybe related:
https://github.com/microsoft/terminal/issues/4228