Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add if statement for output template #5633
Comments
|
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). |
|
@jaimeMF, I understand the concern. I solved it using an |
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 withNA.<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"