Limit titles to 200 characters (Closes #789)
authorPhilipp Hagemeister <phihag@phihag.de>
Thu, 18 Apr 2013 04:27:11 +0000 (06:27 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Thu, 18 Apr 2013 04:27:11 +0000 (06:27 +0200)
youtube_dl/FileDownloader.py

index d4f9cc621abfcc963911e4156eb0ea18c06055b3..96da754fb11ea083e4c2b04d4da53aa54869b3ed 100644 (file)
@@ -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']