aahancoc / tree_magic

Determines the MIME type of a file by traversing a filetype tree.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tree_magic misidentifies audio files

lovesegfault opened this issue · comments

If you test tree_magic on the test files in Musync (Check the data/ folder) you get mostly bogus results, with only a couple identifying correctly.

It seems to work fine? I just added them to the test directory and they seem to be fine, except for WAV which is showing up as a generic application/x-riff and the ogg files which don't have proper aliases set up.

Out of curiosity, are you using a Linux system? I tested it on Windows. I'm starting to think pulling the system's MIME database is a bad idea, as there's no real reason to do so outside of obscure proprietary software adding their own definitions.

I'm on Linux, yeah, Arch Linux specifically. And I have to agree that using the system's MIME db is indeed a bad idea. On Linux it can be, and usually is, not correctly configured.