-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using --trim-filenames with --write-info-json or --write-comments results in info.json file name being trimmed at first dot #1837
Comments
|
Is this Unicode aware? (because a single unicode character is "longer" if I'm not mistaken) |
Use |
Holy crap, thank you! Much appreciated! |
Could it be that this only propagates to the video file name and the info.json can still fail? Either that or the application I'm trying to maintain interferes with yt-dlp handling this well otherwise. |
Cant say without seeing your exact options. Open a new issue with verbose log |
Checklist
Description
There seems to be a bug when
--trim-filenames
is used together with--write-info-json
or--write-comments
or probably any option which outputs info.json, and the filename contains a dot/period. The info.json is always trimmed at the first dot, even when it should not be trimmed at all.A simple test is this
yt-dlp.exe -Uv --trim-filenames 200 --write-info-json https://www.youtube.com/watch?v=PXBJIZ1NXFU
I've included the output for this command in the below log.
Although not shown above, other files like the video itself, but also description, thumbnails (even all thumbnails), and the 3 link formats do not suffer this problem e.g.
--write-description --write-info-json --write-thumbnail --write-all-thumbnails --write-url-link --write-webloc-link --write-desktop-link
and you will find all the other files have the expected file names. The problem is not simply with automated filenames, for example if you add
--output Meow.Test.Name
to any download, it will be cutoff at Meow.BTW, you probably don't want to try comments on the earlier video given the large number of comments. If you want to test with comments you can try this video
https://www.youtube.com/watch?v=HsftmWKwGvQ
or just use the output parameter with any video.This problem is not unique to Youtube. It also occurs with Twitch. For example this video
https://www.twitch.tv/videos/1200763265
or again any video using the output parameter e.g.https://www.stuff.co.nz/national/politics/300465842/covid19-nz-auckland-and-lowervaccinated-areas-to-start-at-red-while-wellington-waikato-and-south-island-are-orange
Verbose log
The text was updated successfully, but these errors were encountered: