You use the add_listener() function of the db api to add a callback that is called on various events including metadata change. But be careful not to do much work in the allback as this would tank performance and also dont change metadata in the callback itself as that would lead to infinite recursion. Instead use a different thread or if its a GUI plugin an qt signal to do your changes asynchronously.
|