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

increase possible file name length for youtube transcriptions #476

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

niwa2
Copy link
Contributor

@niwa2 niwa2 commented Jan 24, 2025

Related issues / PRs. Summarize issues.

  • the file name length created from youtube videos is limited to 20 characters.

Summarize Changes

  1. increase the length to 100 characters.

@jhj0517 jhj0517 added the enhancement New feature or request label Jan 24, 2025
@jhj0517
Copy link
Owner

jhj0517 commented Jan 24, 2025

Thank you! I remember that I added this because I got the error when trasncribing youtube.
As my research most OS have file name length limitation of 255, would 200 be safe?

@niwa2
Copy link
Contributor Author

niwa2 commented Jan 24, 2025

I was not sure if there was any other reason for this limit besides the file name length.
Therefore if left some buffer.
If there is no other reason, then we just have to account for the additional characters added as timestamp (if that option is activated).
So I think 200 should be good.

Maybe we could also try to use
os.pathconf(path, 'PC_NAME_MAX'),
To strip the file name to a proper length.

@jhj0517
Copy link
Owner

jhj0517 commented Jan 24, 2025

Thanks. I think 200 would be safe 😊.
It would be good if I could use os.pathconf, but it seems to be a Unix only API : https://docs.python.org/3.8/library/os.html#os.fpathconf

Thanks for contribution, merge it!

@jhj0517 jhj0517 merged commit 44c0681 into jhj0517:master Jan 24, 2025
9 checks passed
@niwa2 niwa2 deleted the youtube_file_name_length branch January 24, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants