INTERACT FORUM

More => Old Versions => JRiver Media Center 23 for Windows => Topic started by: Endeavor on February 26, 2018, 05:53:21 pm

Title: A Custom View Expressions Assistance
Post by: Endeavor on February 26, 2018, 05:53:21 pm
Hello,
I am attempting to create a custom view which initially groups artists (names) by alphabet (A, B, etc...) showing, on roll up, "Artists" whose names begin with the selected letter category. Again on roll up, selecting "Albums" on an artist shows the artists' albums.
The custom view combines the categories "ArtistG," "Artists," and "Albums." These categories I have defined as user fields, with expressions. These expressions are:

"ArtistsG" =  if(isequal([album artist (auto)],/(multiple,8),/(various),if(isequal(mid([album artist (auto)],0,3),the,1),mid([album artist (auto)],4,1),if(isequal(Mid([album artist (auto)],0,1),1,6),0 - 9,Mid([album artist (auto)],0,1)))

"Artists" = if(isequal([album artist (auto)],/(multiple,8),/(various),[album artist (auto)])

"Albums" = if(isempty([album]),,[album])

The custom view works, but there a couple of artifacts that belie my inexperience with expressions. For example, the primary alphabetical groups show 0,A, 0,B, 0,C, etc.  Also, the artists under each alphabet letter are showing 0, Bob Dylan), or 0, Van Morrison).

If someone is so inclined, I could use a bit of help cleaning the expressions.

Thanks, Ron
Title: Re: A Custom View Expressions Assistance
Post by: ~OHM~ on February 26, 2018, 07:15:15 pm
what is "on roll up"
Title: Re: A Custom View Expressions Assistance
Post by: Endeavor on February 26, 2018, 08:47:02 pm
Roll Up is really a mouse over. E.g. In this case, mouse over letter "B," choose "Artists"  = list (thumbs) of artists with B name. Mouse over one of the artists, select "Albums" = list of the artists' albums.
Title: Re: A Custom View Expressions Assistance
Post by: marko on February 26, 2018, 11:55:45 pm
This is just a parenthesis issue... a cursory glance suggests that your 'escapes' are misplaced. We'll do Artists first as it's simpler...

"Artists" = if(isequal([album artist (auto)],/(multiple,8),/(various),[album artist (auto)])

You're checking Album Artist (Auto) for "Multiple", so just remove all parenthesis here to remove complexity...
Code: [Select]
if(isequal([album artist (auto)],multiple,8),/(various/),[album artist (auto)])
and "ArtistsG" with similar clean up, was missing a closing parenthesis at the end...
Code: [Select]
if(isequal([album artist (auto)],multiple,8),/(various/),if(isequal(mid([album artist (auto)],0,3),the,1),mid([album artist (auto)],4,1),if(isequal(Mid([album artist (auto)],0,1),1,6),0 - 9,Mid([album artist (auto)],0,1))))
Are these better for you now?

-marko

Title: Re: A Custom View Expressions Assistance
Post by: ~OHM~ on February 26, 2018, 11:56:15 pm
i c...is that a british term?
Title: Re: A Custom View Expressions Assistance
Post by: Endeavor on February 27, 2018, 09:43:41 am
Marko,

Thank you for your comments; particularly the focus on the escapes. Also, I completely missed the last closing parenthesis in the "ArtistsG" expression.

And, yes, the view works perfectly now. +1 ;D

Cheers, Ron