Quote:
Originally Posted by ownedbycats
On the MetadataManagement page, the user that provided the "normalizing content ratings" used add_to_replace_metadata rather than replace_metadata.
As I'm still a bit unfamiliar with the differences between replace and add_to_replace_metadata (other than the latter is better for specifically overriding metadata for specific stories), any idea why they would do this?
|
replace_metadata in a more specific section will override replace_metadata from a more general section. add_to_replace_metadata is additive instead of replacement. If you have a replace_metadata setting in [defaults], [<site>], [epub] and [<storyUrl>], only the one in the most specific section ([<storyUrl>] in this example) will be used. add_to_replace_metadata can be in each section and their values will all be used.
There's a wiki page section on
add_to_X.
You can creatively use replace_metadata and add_to_replace_metadata in different sections to change what's applied when, but it's really not that useful to 99.9% of users, I expect.
That example probably uses add_to_replace_metadata because then it will still work if the user already has replace_metadata settings.