View Single Post
Old 01-24-2023, 09:36 AM   #7979
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,033
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
Question: How do conditionals handle replaced values?

Example:
category=>foo=>bar

Would I use &&category==foo or &&category==bar?
Quote:
Originally Posted by chrnno View Post
Replace metadata does lines one-by-one in order and on conditionals simply checks what the value is at that point. Does not keep track if value has been changed previously, nor skip ahead to check if it will be changed.
Close, but not quite. Yes, it does line-by-line, but it does it on the value currently requested. What happens with a conditional is that the same look code is recursively called on the conditional entry. (Presumably 'bar' in this case.)

In this case, category when it's found in &&category==bar and the final value of category after all it's transformations is what's used.

But to prevent infinite recursion, nothing that changes category can use category for a conditional. It's easy do that accidentally and not realize it.
JimmXinu is offline   Reply With Quote