Need `--trim-filenames` option to be added please!
9x3l6 opened this issue · 4 comments
Please add --trim-filenames
because some of the videos I try downloading give error [Errno 36] File name too long: '/tmp/....webp
and [Errno 36] File name too long: '/tmp/...description
and so on.
See this yt-dlp/yt-dlp#2329 (comment)
Thank you!
I won't be available until wednesday, so if you need it faster you could contribute :)
Thanks!
I'm not sure that this option properly works, because I've tested and getting these results (--trim-filenames 12):
[youtube] oDAw7vW7H0c: Downloading webpage
[youtube] oDAw7vW7H0c: Downloading ios player API JSON
[youtube] oDAw7vW7H0c: Downloading android player API JSON
[youtube] oDAw7vW7H0c: Downloading m3u8 information
[info] oDAw7vW7H0c: Downloading 1 format(s): 247+251
[info] Writing video metadata as JSON to: /home/norkun.info.json
ERROR: Cannot write video metadata to JSON file /home/norkun.info.json
So it looks like that it cuts the download path, not the filename 🤔
Given that oDAw7vW7H0c title is 10 chars long, it should not truncate at all
you can find the code here: https://github.com/norkunas/youtube-dl-php/tree/trim-filenames
Ok, I'll verify this when I have a chance and let you know my thoughts. Thanks for the update