[YoutubeDL] Encode thumbnail filename (Closes #6714)
authorSergey M․ <dstftw@gmail.com>
Sun, 30 Aug 2015 20:01:13 +0000 (02:01 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 30 Aug 2015 20:01:13 +0000 (02:01 +0600)
youtube_dl/YoutubeDL.py

index cad6b026e81936e1f80cc527cc43c16bd4b9896d..982e658cea98dc55edfacea3e9eca4399b5ceb1a 100755 (executable)
@@ -2009,7 +2009,7 @@ class YoutubeDL(object):
                                (info_dict['extractor'], info_dict['id'], thumb_display_id))
                 try:
                     uf = self.urlopen(t['url'])
-                    with open(thumb_filename, 'wb') as thumbf:
+                    with open(encodeFilename(thumb_filename), 'wb') as thumbf:
                         shutil.copyfileobj(uf, thumbf)
                     self.to_screen('[%s] %s: Writing thumbnail %sto: %s' %
                                    (info_dict['extractor'], info_dict['id'], thumb_display_id, thumb_filename))