Closed dmcc closed 1 month ago
Actually @MelHarbour was already looking into the tagging situation. He should review this.
Good tip about tinytag, I like the fact its pure python
We currently use ffmpeg/ffprobe as our primary tag reader but it has some issues with mp3 files where it simply doesnt read some of the tags, hence eyed3 is only used to fill in the blanks for mp3 files only. We are considering just switching to a different tag library completely, such as taglib or mutagen but the hard thing is that none of them are async friendly (so we still need to run in an executor) and full support for all tags and filetypes is also hard, that is why ffprobe was so great.
I guess we can swap it around. Use a more robust tag scanner for all common file formats and use ffprobe only for the obscure ones. I am definitely going to look into tinytag, maybe we can even make it async friendly
Thanks for the context! By the way, I just noticed that tinytag has a great library of weird MP3 (and other audio format) samples to test for robustness.
This one in particular is a great example of a file that's not supported by eyed3 but is parseable by tinytag. Happy to add it as a test case if that would be helpful.
What version of Music Assistant has the issue?
2.2.2
What version of the Home Assistant Integration have you got installed?
N/A
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
The problem
eyed3
returnsNone
when reading some MP3 files. This is related to the fixed issue https://github.com/music-assistant/hass-music-assistant/issues/2656 but with a slightly different error message. We get this stacktrace when running in a development container:How to reproduce
Not sure, but some of my badly tagged files seem to still anger
eyed3
(incidentally, I think there are other MP3 tag parsers which might be more robust -- I've had good luck with tinytag in other projects). I haven't dug into whyeyed3
rejects the files but it's hopefully moot as I have a workaround.Music Providers
N/A
Player Providers
N/A
Full log output
No response
Additional information
PR with a workaround coming soon!
What version of Home Assistant Core are your running
2024.8.2
What type of installation are you running?
Home Assistant Container
On what type of hardware are you running?
Linux