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

new option to force print output filename #62

Merged
1 commit merged into from
Jan 26, 2011
Merged

Conversation

imrehg
Copy link
Contributor

@imrehg imrehg commented Jan 25, 2011

Usually I use youtube-dl together with other scripts, when e.g. download and transcode, and it lacked the functionality to know where a given file will be saved. I added a new option, --get-filename, following the patter of the other "verbose" options.

@rg3
Copy link
Collaborator

rg3 commented Jan 25, 2011

Nice. The code looks good. This is almost ready to be merged. I added a note on your commit that you should read, just to fit my coding style. Apart from that, simply capitalize the first sentence in the commit message and fix a typo (quet for quiet). Rebase as a single fixed commit and I'll merge.

When using youtube-dl within scripts, it is very useful to know
what will be the final output filename with all the title settings and
filename templates applied. Add option to the quiet mode operations
to print that info.

For this I had to move the filename-generation into its own function.
As much as I can tell it should work almost always well, ie. not to
break things if one not actually interested in the title, like in
case of other forced printing. That is, unless there's an invalid
system charset or the user specified a wrong output template. In that
case probably could be assumed that the user does have a problem
(the former) or did want to mess with the filename (the latter).

Signed-off-by: Gergely Imreh <[email protected]>
@imrehg
Copy link
Contributor Author

imrehg commented Jan 26, 2011

Thanks for the feedback, I updated the code. Should be all set. :)

@FelixChery FelixChery mentioned this pull request Apr 24, 2019
joedborg referenced this pull request in joedborg/youtube-dl Nov 17, 2020
[pull] master from rg3:master
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants