Fixed 'Filename too long' errors

This commit is contained in:
Patrick A. Levell 2020-01-14 12:55:54 -05:00
parent 628e5bc0b7
commit 76a6cdebf5

View File

@ -635,6 +635,12 @@ class YoutubeDL(object):
try:
template_dict = dict(info_dict)
##### 2020-Jan-13 PAL - Fix 'Filename too long errors' - BEGIN
if 'title' in template_dict.keys():
if len(template_dict['title']) > 200:
template_dict['title'] = template_dict['title'][:200].strip() + '_'
##### END
template_dict['epoch'] = int(time.time())
autonumber_size = self.params.get('autonumber_size')
if autonumber_size is None: