INTERACT FORUM
More => Old Versions => JRiver Media Center 24 for Windows => Topic started by: jsbenson on September 28, 2018, 09:01:02 pm
-
I'm rebuilding my server after a crash, and can't seem to figure out what I'm doing wrong here. I'm grouping by series, and in the group label I'm trying to display the film count in the title. Using Star Wars (many titles), and Sucker Punch (single title) as examples
if(IsEmpty([Series, 1],0),[Name, 1],[Series, 1] /(GroupCount()/ Films)) results in:
Sucker Punch)
Star Wars (9 Films)
In this example, Star Wars is correct, but Sucker Punch has a trailing ")"
if(IsEmpty([Series, 1],0),[Name, 1],[Series, 1] /(GroupCount()/ Films) results in:
Sucker Punch
Star Wars (9 Films
In this example, Sucker Punch is correct, but Star Wars is missing the closing parenthesis
Thanks for the help.
-
I've not tested, but, your first example looks to be the correct expression. It looks to me as though you're missing an escape on the second last closing parenthesis.
That's the one you want MC to output literally, whilst the last one is the one that closes the expression off.
As it is, MC is using the second last one to close off the expression, then outputting the final one literally, in all cases.
if(IsEmpty([Series, 1],0),[Name, 1],[Series, 1] /(GroupCount()/ Films/))
-
Marko beat me, but I tested! :D
if(IsEmpty([Series, 1],0),[Name, 1],[Series, 1] /(GroupCount()/ Films))
You missed a "/" after "Films". Try;
if(IsEmpty([Series, 1],0),[Name, 1],[Series, 1] /(GroupCount()/ Films/))
That seems to work for me for Series and Non-series films.
It always helps me to count opening and closing brackets to see that they match. Some errors become obvious then. In this case, the escaped "(" confuses things.
if ( IsEmpty ( [Series, 1],0 ) ,[Name, 1],[Series, 1] /( GroupCount ( ) / Films ) )
Or break out the expression, and again count brackets.
i.e.
if(
IsEmpty(
[Series, 1],0
)
,[Name, 1],[Series, 1] /(
GroupCount(
)
/ Films
)
)
Three opening brackets, four closing brackets. One closing bracket should have been escaped.
-
Right on!
Thanks for the help!