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.
Sanitize filename: Replace ": " with " -" but replace ":" with "-" #4683
Comments
|
Thank you for the report. I believe this issue to be fixed in youtube-dl 2015.01.11 and newer. See our FAQ if you need help updating. |
Downloading videos from YouTube containing ":" will make odd sanitized filenames.
Currently ":" is replaced with " -" which makes perfect sense in the case of "Some Title: Subtitle" which will then be transformed to "Some Title - Subtitle".
But in cases where the title contains a timestamp like "New World Record at 0:12:34" it gets transformed to "New World Record at 0 -12 -34" instead of the slightly better "New World Record at 0-12-34".
It could be solved by e.g. looping over the string and looking at the next char, instead of mapping each char: