mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-14 09:47:15 +08:00
Remove extra spaces & trim title
This removes extra spaces in title, also removes any leading and trailing whitespace, before title size check and after title is copied to 'fulltitle'. Repeated spaces can waste space in a filename, leading spaces can mess up sorting, and make file handling more difficult.
This commit is contained in:
parent
055f417278
commit
f9e04e932f
@ -1423,6 +1423,7 @@ class YoutubeDL(object):
|
||||
raise MaxDownloadsReached()
|
||||
|
||||
info_dict['fulltitle'] = info_dict['title']
|
||||
info_dict['title'] = " ".join(info_dict['title'].split())
|
||||
if len(info_dict['title']) > 200:
|
||||
info_dict['title'] = info_dict['title'][:197] + '...'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user