From f9e04e932fbdb741b5043fff80582221034ed1a3 Mon Sep 17 00:00:00 2001 From: dyn888 Date: Fri, 29 Jan 2016 13:44:21 +0100 Subject: [PATCH] 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. --- youtube_dl/YoutubeDL.py | 1 + 1 file changed, 1 insertion(+) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index e1bd40843..77e8740d4 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -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] + '...'