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

limited base filename to 230 bytes to be able to download audiobooks with long filenames. #216

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

devvythelopper
Copy link

@devvythelopper devvythelopper commented Dec 14, 2024

this is a fix for #215

also added filename-mode option: asin_only

@devvythelopper devvythelopper changed the title limited base filename to 230 characters to be able to download audiobooks with long filenames. added filename-mode option: asin_only limited base filename to 230 bytes to be able to download audiobooks with long filenames. Dec 14, 2024
@mkb79 mkb79 self-requested a review December 14, 2024 12:46
src/audible_cli/models.py Outdated Show resolved Hide resolved
Refactored the `create_base_filename` method to streamline mode handling and added a `max_length` parameter for truncation. Removed redundant encoding logic and ensured compatibility with all supported modes, improving code clarity and maintainability.
This change ensures filename length is restricted by bytes rather than characters, addressing potential issues with UTF-8 encoded characters that may span multiple bytes. Filesystem compatibility is improved and truncation behavior is adjusted to avoid errors with multi-byte characters.
@mkb79 mkb79 linked an issue Dec 15, 2024 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

Can't donwload files if title or subtitle is too long
2 participants