|
|
@ -543,6 +543,11 @@ class YoutubeDL(object):
|
|
|
|
outtmpl = self.params.get('outtmpl', DEFAULT_OUTTMPL)
|
|
|
|
outtmpl = self.params.get('outtmpl', DEFAULT_OUTTMPL)
|
|
|
|
tmpl = compat_expanduser(outtmpl)
|
|
|
|
tmpl = compat_expanduser(outtmpl)
|
|
|
|
filename = tmpl % template_dict
|
|
|
|
filename = tmpl % template_dict
|
|
|
|
|
|
|
|
# Temporary fix for #4787
|
|
|
|
|
|
|
|
# 'Treat' all problem characters by passing filename through preferredencoding
|
|
|
|
|
|
|
|
# to workaround encoding issues with subprocess on python2 @ Windows
|
|
|
|
|
|
|
|
if sys.version_info < (3, 0) and sys.platform == 'win32':
|
|
|
|
|
|
|
|
filename = encodeFilename(filename, True).decode(preferredencoding())
|
|
|
|
return filename
|
|
|
|
return filename
|
|
|
|
except ValueError as err:
|
|
|
|
except ValueError as err:
|
|
|
|
self.report_error('Error in output template: ' + str(err) + ' (encoding: ' + repr(preferredencoding()) + ')')
|
|
|
|
self.report_error('Error in output template: ' + str(err) + ' (encoding: ' + repr(preferredencoding()) + ')')
|
|
|
|