-
-
Notifications
You must be signed in to change notification settings - Fork 797
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
[Bug]: dates with spaces or no month/day are not able to be parsed #2833
Comments
Glad you acknowledge that :) There has been a lot of discussions regarding parsing dates and we decided to go with a strict validation: Dates can be in the formats I never saw the formats you are seen in the wild, and I even have a bunch of M4A files in my library, either bought from Apple or tagged with iTunes. Having said that, I don't see any issues supporting these two (invalid) formats ( I'll tag this issue as a navidrome/scanner/metadata/metadata.go Line 300 in 1e5e8be
and its tests are here: navidrome/scanner/metadata/metadata_internal_test.go Lines 9 to 27 in 798b03e
One just need to add the necessary formats to the tests, and make the code works with it. If anyone wants to work on this, feel free to submit a PR. Reach out if you have any questions. |
Yeah these are invalid date formats, so they aren't parsed. Not a bug. Up to you @deluan how much effort we want to put into the code to parse this. We'll never be able to catch all: |
I certainly think the 2023-00-00 is fairly common and I was shocked how many m4a’s had the spaces. I think the 00-00 should be handled and treated as a year. I don’t really know if the one with spaces should be (as I agree it is wrong) but it just seems easy enough to detect. many of the others aren’t used for tags as they’re not easily machine readable. |
If you look at the code, it does three steps with the tag value:
(this is done in this order for speed/efficiency: if the tag only has a 4-digit year, it's a waste of time to parse it as a full date) So what happens when it encounters
When it encounters
When it encounters
When it encounters
When it encounters a non-date value like
|
I confirm that:
Version
0.51.0
Current Behavior
Errors are logged:
Expected Behavior
Navidrome should use its best efforts to accommodate these odd tags
Steps To Reproduce
Environment
How Navidrome is installed?
Docker
Configuration
Relevant log output
The text was updated successfully, but these errors were encountered: