1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-23 08:26:50 +00:00

Limit titles to 200 characters (Closes #789)

This commit is contained in:
Philipp Hagemeister 2013-04-18 06:27:11 +02:00
parent bfdf469295
commit 0599ef8c08

View 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']