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: How do I handle tagging in an input plugin when the file does not supp (Read 2025 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How do I handle tagging in an input plugin when the file does not supp

I have an old input plugin for an ADPCM file format (the music & sfx from Final Fantasy XI in particular). It was originally written for foorbar2000 0.8.x.

It implemented the retrieval of info (OPEN_FLAG_GET_INFO set on open()), providing some standard metadata (codec, bitrate, etc.) as well as a few extra ones (sample format (PCM/ADPCM), some header fields for debugging, etc). This worked fine, and allowed tagging it in foobar2000 (setting title/artist/...) although the tags only got stored in the database (the file does not allow adding real tags).

How does this translate to foobar2000? Providing the info via get_info() works just fine. However, setting values for tags has no effect; after hitting Apply in the properties dialog, everything reverts to empty.
So what I want to know is: how do I implement retag() (which seems to be the relevant method) so that foobar2000 remembers the values in its database?
Would the appropriate way be to use metadb_io[_vx] from retag(), or is it metadb_io that's calling my plugin's retag() method to begin with? Or do I have to explicitly get (and merge) file info from the database as part of get_info()?

As an aside, the property dialog shows my custom fields in all-uppercase (even when set in lower or mixed case); is there a way for me to provide properly-cased names when setting fields (string/int) on file_info?