INTERACT FORUM

More => Old Versions => JRiver Media Center 32 for Windows => Topic started by: Dorsai on May 08, 2024, 08:31:37 am

Title: Smartlist of albums that contain 4 or more songs rated 4 or higher
Post by: Dorsai on May 08, 2024, 08:31:37 am
I would like to create a smartlist of albums that contain 4 or more songs with a song rating of 4 or higher. Any assistance will be deeply appreciated.
Title: Re: Smartlist of albums that contain 4 or more songs rated 4 or higher
Post by: zybex on May 08, 2024, 09:34:48 am
Not exactly the same, but maybe this thread can give you some clues:
https://yabb.jriver.com/interact/index.php/topic,137647.0.html

You can create a new field calculated called [AlbumGoodRatings] with this expression to count the number of tracks with 4/5 rating:
ListCount(ListFilter(FieldQuery(Artist - Album /(Year/), [Artist - Album (Year)], Rating, 1, 1), 0, 4,5))

Then you can use it on a Smartlist. HOWEVER, this expression will be very slow for any decent sized library. To fix that you need to use ZStats to update the [AlbumGoodRatings] value in a nightly/daily scheduled run (in that case, the AlbumGoodRatings field is a standard non-calculated field).
Title: Re: Smartlist of albums that contain 4 or more songs rated 4 or higher
Post by: zybex on May 08, 2024, 09:37:08 am
Looks like you've asked this before and were given an alternate solution:
https://yabb.jriver.com/interact/index.php/topic,128512.msg897224.html#msg897224
Title: Re: Smartlist of albums that contain 4 or more songs rated 4 or higher
Post by: BryanC on May 08, 2024, 09:39:14 am
I think this should do it?

Code: [Select]
[Media Type]=[Audio] [Rating]=>=4 [=ItemCount(AlbumKey/(/)/[Rating/])]=>=4 ~a

Title: Re: Smartlist of albums that contain 4 or more songs rated 4 or higher
Post by: zybex on May 08, 2024, 10:52:28 am
Nice expression! But it won't show albums that have e.g. 2 fours and 2 fives, only albums that have at least 4 fours OR 4 fives.
Maybe it can be tweaked to fix that. Anyway, ItemCount() is also slow, but not as much as FieldQuery.

Edit:
[Media Type]=[Audio] [Rating]=>3 [=itemcount(/#AlbumKey().compare([rating,0],>,3)#/)]=>3 ~a