maybe I'm overseeing something here but is there a reason why genres is not searchable with an OR (||) operator? Have searched the forums for similar use cases but couldnt find a fitting one and also experimented with .match() and similar things but It feels like I'm smashing my head against a brick wall. Any help is greatly appreciated.
What im trying to do: Filter out titles with genres containing "Soap" or "Reality".
What i tried:
Groovy: Select all
{genres.contains(/Reality||Soap/) ? 1 : 2}
GZSZ: 2
Mr. Robot: 2
Groovy: Select all
{'Reality'||'Soap' in genres ? 1 : 2}
GZSZ: 1
Mr. Robot: 1
Groovy: Select all
{genres =~ /Reality||Soap/ ? 1 : 2}
GZSZ: 1
Mr. Robot: 1
Groovy: Select all
{genres == 'Reality'||'Soap' ? 1 : 2}
GZSZ: 1
Mr. Robot: 1
.
Console Output: Select all
n The Family Stallone
y 2023
s 1
e 7
s00e00 S01E07
t Green Light Fight
genre Reality
genres [Reality]
Console Output: Select all
n Gute Zeiten, schlechte Zeiten
y 1992
s 1
e 7
s00e00 S01E07
genre Drama
genres [Drama, Soap]
Console Output: Select all
n Mr. Robot
y 2015
s 1
e 10
s00e00 S01E10
genre Crime
genres [Crime, Drama]