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

[BUGFIX] Fix "File name too long" errors #57

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

Conversation

thegass
Copy link
Contributor

@thegass thegass commented Oct 25, 2024

  • some artists use ZeroWidthSpace in their names/releases (Why? WTF) which results in file/directory names longer than 255
  • solution remove ZeroWidthSpace from artist & releasenames

fixes #56 for my usecase.
all my problematic releases are downloading for now.

@Ezwen
Copy link
Owner

Ezwen commented Oct 26, 2024

That's surprising indeed that this happens… I think some languages use these characters to specify when can a word break can occur. But since a file name should always be on a single line, you are completely right that they should be removed.

To simplify your proposal, I suggest we switch the type of the existing map UNICODE_CHARS_REPLACEMENTS from <Char, Char> to <String, String>, which would allow you to add this new case without creating a new map and a new conditional. Would you be OK to make this small change?

@thegass
Copy link
Contributor Author

thegass commented Oct 26, 2024

sounds good to me.

@Ezwen
Copy link
Owner

Ezwen commented Oct 30, 2024

Let me know when you have time to make the change and I'll do a second review.

Sorry about the conflicts that appeared, I merged another PR that changed the same code area :)

oliver gassner added 2 commits October 30, 2024 19:59
* some artists use ZeroWidthSpace in their names/releases (Why? WTF) which results in file/directory names longer than 255
* solution remove ZeroWidthSpace from artist & releasenames
* remove zero-width spaces
* convert hashMap to <String, String>
@thegass
Copy link
Contributor Author

thegass commented Oct 30, 2024

rebased my pr and unified the maps.
hope it's ok.
this is the first kotlin project I'm working on.

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.

some releases throw a "File name too long" error.
2 participants