mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-20 05:47:24 +01:00
do not strip whitespace characters
This commit is contained in:
parent
46cebee490
commit
1974b2b332
@ -1383,9 +1383,7 @@ def _prepare_filename(self, info_dict, *, outtmpl=None, tmpl_type=None):
|
||||
if trim_file_name:
|
||||
# https://github.com/yt-dlp/yt-dlp/issues/5526#issuecomment-1312783517
|
||||
no_ext, *ext = filename.rsplit('.', info_dict.get('ext', '').count('.') + 1)
|
||||
# cut filename and remove trailing spaces and extra dots
|
||||
name = no_ext[:trim_file_name].strip().rstrip('.')
|
||||
filename = join_nonempty(name, *ext, delim='.')
|
||||
filename = join_nonempty(no_ext[:trim_file_name], *ext, delim='.')
|
||||
|
||||
if tmpl_type in ('', 'temp'):
|
||||
final_ext, ext = self.params.get('final_ext'), info_dict.get('ext')
|
||||
|
Loading…
Reference in New Issue
Block a user