From 80983be77a4ad0eafc96b51a618d6cf254dd4518 Mon Sep 17 00:00:00 2001 From: cousteau Date: Tue, 11 Aug 2015 03:53:11 +0200 Subject: [PATCH] New output format string version --- youtube_dl/YoutubeDL.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index cad6b026e..ef4677dd1 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -566,9 +566,11 @@ class YoutubeDL(object): if v is not None) template_dict = collections.defaultdict(lambda: 'NA', template_dict) - outtmpl = sanitize_path(self.params.get('outtmpl', DEFAULT_OUTTMPL)) + outtmpl = self.params.get('outtmpl', DEFAULT_OUTTMPL) tmpl = compat_expanduser(outtmpl) - filename = tmpl % template_dict + # Backwards compatibility fix (deprecated): %(foo)s -> {foo}, %% -> % + tmpl = re.sub(r'(?