The new API requires a component to provide a list of the names of the provided fields. This will allow the title formatting engine to do more efficient look-up of fields compared to the old API. It will also allow the operating system to page out code for unused fields, reducing foobar2000's memory usage with lots of components loaded.
The reason why there will not be a replacement API that allows components to provide functions for use in title formatting code is that we, the foobar2000 developers and forum staff, do not like the style of title formatting use that has emerged since and due to the introduction of the metadb_display_hook API and the effect this has on the reputation of foobar2000. The title formatting language is not a full-blown scripting language, and we strongly believe it should not be used as such. While we have tried to reduce the amount, size and complexity of title formatting code in the official components to make foobar2000 easier to use, a contrary development has taken place with third-party components. As a first step to emphasize our position on this matter, we have decided to stop official support for an API that has been vital in this development. Third-party developers are free to choose their own position in this matter.
Consequences for developers
If you wish to support fields and functions provided through metadb_display_hooks in your component, you will need to implement a titleformat_hook that calls the metadb_display_hook instances. There should be no problems, if you already do this before the core stops using metadb_display_hooks except for a possible performance loss.
Consequences for users
The metadb_display_hook API is used to provide additional fields and functions when title formatting tracks. Removing support for this in the core will have the following effects on official components and on third-party components that do not add explicit support for the metadb_display_hook API:
- Additional fields will only be usable, if the component providing the fields is ported to (also) implement the new API.
- Additional functions will not be usable.
