Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Bug - MIDI files somehow lose tags (Read 2462 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Bug - MIDI files somehow lose tags

I believe foobar uses an internal database to store tags for midi files, since midi files don't support tags AFAIK. Anyway...

MIDI files occasionally lose their tags. The tags or their values just vanish. It's happened a few times sporadically over a period of months to a few years.

I can't pinpoint what kind of tags or which ones, when they vanish, etc. I just know that now and then when I run a batch-auto-rename and other tagging work, I suddenly come across a bunch of MIDIs that definitely have a couple fewer tags than last time I saw them (the title field, for example). They aren't opened by any other programs on my computer, foobar is their only manager, so that can't be it.

Anyone got any ideas what to do?

Edit: I think I can say 1 thing for certain: they don't just lose a few tags, they lose all their tags. I kind of suspect that the midi tag db isn't updated correctly when midi files are moved, causing the db to lose track of the moved files, leaving orphaned tags in the db and tag-less midis in the filesystem.

Also, it seems affected files suddenly get extra tags:

Those tags at the bottom are new, I sure didn't leave them there when adding the file (I added back the genre tag myself already)

Re: Bug - MIDI files somehow lose tags

Reply #1
Clearly, I have no idea how to properly implement a metadb_index_client service based on a hash returned in the file_info's info strings, so it's currently entirely based on absolute paths to the files, as well as their general MIDI attributes.

Which is totally irrelevant to the future of foobar2000, assuming the 2.0 that is in mobile ever makes it to a desktop version, because the metadb_index_client service has been eliminated, or hasn't been implemented yet, or I don't know what.

Re: Bug - MIDI files somehow lose tags

Reply #2
Clearly, I have no idea how to properly implement a metadb_index_client service based on a hash returned in the file_info's info strings, so it's currently entirely based on absolute paths to the files, as well as their general MIDI attributes.

I finally realized what you're talking about... you're the guy that made the midi plugin? And I guess you're taking a jab at yourself for using the file path as a hash input to identify midi files by?

So has this issue been fixed in any updates since I posted this thread?

Re: Bug - MIDI files somehow lose tags

Reply #3
It only uses the file path if it can't find any other hash information to use. The hash information is supposed to be passed in by the core, which is apparently not reading file tags before passing them off to my filter. Ask Peter to look at my source code and tell me what I'm doing wrong.

Re: Bug - MIDI files somehow lose tags

Reply #4
Uh, I'm not exactly invited to the development party. Ask who how and where to look at what source code of what filter?

Do you maybe instead know of any tricks like embedding midi in ogg that work in foobar? That would take care of tags while leaving the original midi data to be played as usual...

Re: Bug - MIDI files somehow lose tags

Reply #5
Is there any news on this? I just had a bunch of midi files get their tags deleted again during a mass tag update, and even using mtags to persist and restore their tags doesn't work... Would be really great if foobar stopped having this issue...

Re: Bug - MIDI files somehow lose tags

Reply #6
It's a component issue, not the player. Code fixes welcome.