Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: separate options for output file name and output directory #11311

Open
DarwinAwardWinner opened this issue Nov 27, 2016 · 3 comments
Labels

Comments

@DarwinAwardWinner
Copy link

@DarwinAwardWinner DarwinAwardWinner commented Nov 27, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.11.27. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.11.27

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


Description of your issue, suggested solution and other information

I use a youtube-dl.conf file with something like --output "~/The_Usual_Directory/%(title)s.%(ext)s". However, sometimes, I want to change the output directory to another one while keeping the same file name template. In order to do this, I have to type out --output "~/Some_Other_Directory/%(title)s.%(ext)s", which is annoying because remembering the template part is difficult, and I usually have to copy and paste out of my youtube-dl.conf and then change the path. This would be easier if there were separate options for the file name and destination directory, in which case I could just type something like --outdir ~/Some_Other_Directory. Since obviously the --output option is also useful in some cases, I'm not suggesting removing it, but rather providing an alternate way to set it. The semantics of which one takes priority in the case where both are provided would be important, though. It would have to be chosen so that command-line options override the config file, but if --output is used in the config file and then --outdir is used on the command line, the file name (sans directory path) given in the config file would still be used with the new output directory. So for example youtube-dl --output ~/Dir1/file.mp4 --outdir ~/Dir2 should output to ~/Dir2/file.mp4.

I understand if this is ultimately too complicated to justify the effort, but I think it would be a nice feature to have.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 28, 2016

A simpler idea is: if the output template ends with a slash or a backslash, treat it as a directory and append %(title)s.%(ext)s in youtube-dl

@yan12125 yan12125 added the request label Nov 28, 2016
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 28, 2016

@yan12125 this will cause unnecessary confusion - one may expect output template without trailing slashes to be treated as directory.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 28, 2016

You're right that's possible. @DarwinAwardWinner's proposal is better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.