Skip to content
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

Need --trim-filenames option to be added please! #215

Open
9x3l6 opened this issue Dec 16, 2023 · 4 comments
Open

Need --trim-filenames option to be added please! #215

9x3l6 opened this issue Dec 16, 2023 · 4 comments

Comments

@9x3l6
Copy link
Contributor

9x3l6 commented Dec 16, 2023

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!

@9x3l6 9x3l6 changed the title Need --trim-fienames option to be added please! Need --trim-filenames option to be added please! Dec 16, 2023
@norkunas
Copy link
Owner

I won't be available until wednesday, so if you need it faster you could contribute :)

@9x3l6
Copy link
Contributor Author

9x3l6 commented Dec 16, 2023

Thanks!

@norkunas
Copy link
Owner

norkunas commented Dec 20, 2023

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

@9x3l6
Copy link
Contributor Author

9x3l6 commented Dec 25, 2023

Ok, I'll verify this when I have a chance and let you know my thoughts. Thanks for the update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants