View Single Post
Old 01-24-2025, 02:02 PM   #10234
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,043
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Each replace_metadata line is considered separately, there isn't a mechanism for "didn't match any other line".

One option would be:

You might add your "_Misc." prefix to all entries before looking for specifics like Tolkien and then remove it as part of setting Tolkien.

A second option would be:

There are '.'s in some fandoms, so we can't use that reliably detect already prefixed lines. But it would be possible if you use something other than '.' as the separator during processing--something reasonably expected to be unused anywhere else. Subsitute in "Tolkien__MYDELIMITER__Hobbit" for example.

Then add lines to first prepend your "_Misc." to any entry that doesn't contain "__MYDELIMITER__" (needs to use negative lookahead (?!...) ) and then a final line to change "__MYDELIMITER__" back to '.'.
JimmXinu is offline   Reply With Quote