INTERACT FORUM

More => Old Versions => JRiver Media Center 20 for Windows => Topic started by: Humbledore on April 23, 2015, 03:42:33 am

Title: Thumbnail Text Expression Issues
Post by: Humbledore on April 23, 2015, 03:42:33 am
Hi,

I have some issues with a expression that I will use as a thumbnail text in a album thumbnail categories view. The view is grouped by the expression [Album] - [Disc #].

Here is my expression:

[Album]
If( !IsEmpty([Comment]), [Comment], [Disc #] )
If( !IsEmpty([Credits Audio]), [Credits Audio], [Album Artist] )
[Duration]
FormatDate([Last Played, 0], "Played" yyyy/-MM/-dd, Never Played)

The issues concerns the bold line.

Issue 1:
The Comment field doesnt't show any value. However, if I copy the Comment value to a Custom field and use this field instead, the value becomes visible. Why I wonder?

Issue 2:
If Comment is empty I want the value in Disc # to be viewed, but it doesn't. However, if I test to replace Disc # with Track # the track value becomes visible. Have I missed something here?

Thanks!
Title: Re: Thumbnail Text Expression Issues
Post by: Matt on April 23, 2015, 07:03:48 am
The [Comment] field will always be empty for album groupings.

This is because the code says:

   else if ((pField->GetName() == MF_NOTES) || (pField->GetName() == MF_MM_BIOS) ||
      (pField->GetName() == MF_LYRICS) || (pField->GetName() == MF_COMMENT))
   {
      // do nothing for really long fields, or else we can take a large performance hit
      strValue.Empty();
   }

So that means even if the comment is all the same for all the files in the grouping, we won't show it.
Title: Re: Thumbnail Text Expression Issues
Post by: Matt on April 23, 2015, 07:16:14 am
I should add that we could consider removing comment from the list of excluded fields if you make a strong case.
Title: Re: Thumbnail Text Expression Issues
Post by: dtc on April 23, 2015, 10:17:28 am
It looks like [Disc #] is also not displayed. Is that another special case?
Title: Re: Thumbnail Text Expression Issues
Post by: Matt on April 23, 2015, 12:42:03 pm
It looks like [Disc #] is also not displayed. Is that another special case?

Yes.  Comment from the code:

// always return empty for a disc number since there's no fast way to count the number of discs
// and also because sorting links MF_DISCNUMBER and MF_TRACKNUMBER and we'd rather ignore MF_DISCNUMBER
// for grouping files during sorting
Title: Re: Thumbnail Text Expression Issues
Post by: gappie on April 23, 2015, 02:51:39 pm
for the [comment] there is an easy way around it. just make an other library field say, comment show, and choose calculated data. and as an expression use [comment]. when using the new field [comment show] in the thumbs it will show. i think this will also work with disk. and if so , you could pack them together, as in the first post, but as a library field and show that in the album thumb.

 :)
gab
Title: Re: Thumbnail Text Expression Issues
Post by: Humbledore on April 23, 2015, 04:25:36 pm
for the [comment] there is an easy way around it. just make an other library field say, comment show, and choose calculated data. and as an expression use [comment]. when using the new field [comment show] in the thumbs it will show. i think this will also work with disk. and if so , you could pack them together, as in the first post, but as a library field and show that in the album thumb.

Thanks for your advices!
Title: Re: Thumbnail Text Expression Issues
Post by: Humbledore on April 23, 2015, 04:33:17 pm
I should add that we could consider removing comment from the list of excluded fields if you make a strong case.

Thanks Matt, but I don't think I will/can make a strong case of this... I have already made a custom library field which reads the value from Comment. That's a solution I can live with even if it is not the most elegant one... :-)