1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-21 06:22:51 +08:00

Strip the filename of beginning and end whitespace

This commit is contained in:
The Stranjer 2020-05-31 14:03:46 -04:00
parent 3148e70723
commit 39a4144527

View File

@ -370,7 +370,7 @@ class FileDownloader(object):
if len(filename) > max_filelen:
self.to_screen("[filename] Too long, truncating")
start_char = len(filename) - max_filelen + 1
filename = filename[start_char:]
filename = filename[start_char:].strip()
return self.real_download(filename, info_dict)