squentin / gmusicbrowser

jukebox for large collections of music
http://gmusicbrowser.org
GNU General Public License v3.0
194 stars 42 forks source link

Modfile metadata #215

Closed dmhursh closed 2 years ago

dmhursh commented 2 years ago

I'm creating a draft pull request to get some feedback. I think it is a good start. There are improvements that can be made in what gets read and how files are validated.

I suspect there are a few more concerns with integrating the new format revolving around the dependency on gstreamer and perhaps making a new optional group of file extensions since mod files are a niche interest.

Let me know if you have any concerns, questions or suggestions.

This is for issue #186

dmhursh commented 2 years ago

I forgot to mention, you can run the tests from the top of the repo with perl -I. t/01_ModFileMetadata.t or prove -I. t The test downloads sample files from modarchive.org if needed. You can delete/clean t/samples when not running tests.

dmhursh commented 2 years ago

I already found one bug. I don't know which file is causing it yet, but I get the following trying to quit after reading tags for files from years 1991-1994 from the hornet archive. Mod files can have almost any ascii characters in them and I didn't do any sanitizing.

Not sure the best route at the moment.

Writing tags in /home/xyz/.config/gmusicbrowser/gmbrc ...
Malformed UTF-8 character: \x88 (unexpected continuation byte 0x88, with no preceding start byte) in substitution (s///) at ./gmusicbrowser.pl line 2609.
*** unhandled exception in callback:
***   Malformed UTF-8 character (fatal) at ./gmusicbrowser.pl line 2609.
***  ignoring at ./gmusicbrowser.pl line 1699.
dmhursh commented 2 years ago

Just as a note for myself so I can pick up tomorrow. The problem files are from 1992 & 1993. There's 65-ish files. I want to file one to write a test case for, then I'll see if I can figure out how to sanitize for unicode.

dmhursh commented 2 years ago

I think that takes care of unicode. My library is converted. I could maybe trying reloading tags for all the mod files as a brütal test.

Otherwise, I'm back to thinking the commit is good pending feedback.

dmhursh commented 2 years ago

I went a head a squash the commits. I can get back the unsquashed version if you like.

squentin commented 2 years ago

committed