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
Downloaded files with slash in tag fields (/) gets converted into new folder #1763
Comments
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Navidrome team are limited, and so we are asking for your help. |
I was unable to comment before the issue was marked stale and closed but I can confirm that this bug still exists in the current 0.49.3 version. Do I need to create a new issue for this? |
Thanks for the call-out. I reopened the issue. |
@deluan hey! I would like to fix this issue also, could you help me like in which file I have to replace the slash with the underscore sign? |
This will require a complete dev environment, with |
@deluan hey! Yes, I have installed entire environment setup in my local machine. |
@deluan Hey thanks for guiding me and it was my first open-source contribution. |
@deluan and I have made the local setup done can you guide me that which fil do I have to change in this issue ? |
Hey @subhajit20 , sorry for the delay. For this we will need to create a function to clean-up filenames. There maybe something ready on the internets, but we don't want to add a new Go dependency just for that ;) Then this function will be used in the two places used to add files to a zip: Line 89 in c12510d
and Line 133 in c12510d
Don't forget to write tests. Let me know if you have any other questions. |
@deluan so I have to just paste these two functions you have mentioned above in two separate files or anything else? |
You will have to create a function like:
Then you will use this function in the places I mentioned above. No new files, put this new function in the |
I haven’t had the time to try it yet but thank you! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
When downloading files from Navidrome 0.47.5 (from an album or playlist), if a tag field contains a "/" character, the download creates a folder at the place of this character in the file name, thus breaking the general, expected file structure.
Example (correct) : A track "Song A" by artist "John" is correctly named "John - Song A.mp3" when downloaded and is placed in the root directory when unzipped.
Example (incorrect): The track "My Track" by artist "Lisa / Michael" when downloaded and unzipped instead gets the filename: "Michael - My track.mp3" inside a folder called "Lisa".
Expected Behaviour
A common solution for such cases is to convert fields with slash ("/") to an underscore ("_") and I believe this would be an easy fix for the problem.
Platform information
The text was updated successfully, but these errors were encountered: