andy-portmen / external-application-button

Communicate with external applications of your OS through a toolbar button or context menu item.
https://webextension.org/listing/external-application-button.html
184 stars 56 forks source link

Feature request: Open a save as dialog #35

Open DJviolin opened 4 years ago

DJviolin commented 4 years ago

I use this script for youtube-dl. I want to open a Save as... dialog to choose the location. For example, the save path will be inserted into the cmd script, like the "[HREF]" tag. Is it possible somehow?

This is the argument that I tried:

/C start "ytdl" "C:\youtube-dl\youtube-dl.exe" -o "[DOWNLOADED_PATH]\%(title)s.f%(format_id)s.%(ext)s" --write-sub --embed-subs --add-metadata --embed-thumbnail --restrict-filenames -f "bestvideo+bestaudio/best" "[HREF]"

It offers the Save as dialog, but the filename remains "watch" only. I think because at this stage, youtube-dl not reporting the filename. So instead of choosing a final file, it would be nice to have a popup dialog, where you only choose the destination folder and that local path will be replaced at the tag, like [DESTINATION_PATH].

sparksnpa commented 4 years ago

I use this for the same purpose as you, but I do it a little differently.

I have a button setup with the arguements "[PROMPT]" "[HREF]", when I execute the button on a video it opens up and asks me for a title, I generally use this for TV episodes so I enter the tv show name. The button executes a batch script that creates a lock and queue system basically adding the links to one of three new batch scripts. When those 3 are executed they will each download one video saving it in the file name like this %~1 - S00E00 - %%%%(title)s.%%%%(ext)s before moving on to the next video. This allows me to process them in batches of 3 and using filebot it renames and moves the tv shows to their respective folder.