Quote:
Originally Posted by JimmXinu
The conditional part of a in/exclude_metadata_pre line (after &&) uses the same routines to get metadata values as everything else. Which means replace_metadata has already been applied to rating when the warnings _metadata_pre line is applied.
The wiki page mentions that for replace_metadata but not for in/exclude specifically:
I will update that wording. Changing the behavior is a huge can of worms I'm not opening.
FYI, warnings is a standard metadata entry, you don't need to use add_to_extra_valid_entries:warnings. And be aware that extrawarnings is not universal, there are only a handful of standard metadata entries that have extraX settings.
Here's a solution that works for me:
Code:
add_to_extra_valid_entries:rating_raw
include_in_rating_raw:rating.NOREPL
include_in_warnings:warnings,"CAUTION"
exclude_metadata_pre:
warnings==CAUTION&&rating_raw!=XXX-I
add_to_replace_metadata:
rating=>^XXX-I$=>NC-17
I've created a raw copy of rating, replaced the extrawarnings line, and matched only "XXX-I" as an entire string. So if "XXX-II" shows up, it doesn't give you "NC-17I".
|
That makes perfect sense, thank you for explaining!