From 76a6cdebf5ddb5efa882efe216370fd752624589 Mon Sep 17 00:00:00 2001 From: "Patrick A. Levell" Date: Tue, 14 Jan 2020 12:55:54 -0500 Subject: [PATCH] Fixed 'Filename too long' errors --- youtube_dl/YoutubeDL.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index f5cb46308..60aff4b0b 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -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: