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

Add if statement for output template #5633

Open
revolter opened this issue May 6, 2015 · 2 comments
Open

Add if statement for output template #5633

revolter opened this issue May 6, 2015 · 2 comments
Labels

Comments

@revolter
Copy link
Contributor

@revolter revolter commented May 6, 2015

I currently use this: -o "D:\Movies\youtube-dl\%(playlist_index)s.%(title)s-%(id)s.%(ext)s" but whenever I download a video that's not in a playlist, it gets saved with a filename that starts with NA.<title>.

It would help if it was possible to check if some variable exists, like -o "D:\Movies\youtube-dl\%if(playlist_index)s{%(playlist_index)s.}%(title)s-%(id)s.%(ext)s"

@jaimeMF jaimeMF added the request label May 6, 2015
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 10, 2015

I think that the "easiest" way to implement this is using a template library (like Jinja2). I undestand that it could be useful, but I don't know if others would agree to implement it with an external library (making it optional of course).

@revolter
Copy link
Contributor Author

@revolter revolter commented May 11, 2015

@jaimeMF, I understand the concern. I solved it using an if in my own python script.

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
2 participants
You can’t perform that action at this time.