From 0599ef8c0827068184f78745a299d043927db4d9 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Thu, 18 Apr 2013 06:27:11 +0200 Subject: [PATCH] Limit titles to 200 characters (Closes #789) --- youtube_dl/FileDownloader.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py index d4f9cc621..96da754fb 100644 --- a/youtube_dl/FileDownloader.py +++ b/youtube_dl/FileDownloader.py @@ -426,6 +426,10 @@ class FileDownloader(object): def process_info(self, info_dict): """Process a single dictionary returned by an InfoExtractor.""" + info_dict['fulltitle'] = info_dict['title'] + if len(info_dict['title']) > 200: + info_dict['title'] = info_dict['title'][:197] + u'...' + # Keep for backwards compatibility info_dict['stitle'] = info_dict['title'] -- 2.22.2