INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Smartlist of albums that contain 4 or more songs rated 4 or higher  (Read 533 times)

Dorsai

  • Recent member
  • *
  • Posts: 46

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.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Smartlist of albums that contain 4 or more songs rated 4 or higher
« Reply #1 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).
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Smartlist of albums that contain 4 or more songs rated 4 or higher
« Reply #2 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
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2663
Re: Smartlist of albums that contain 4 or more songs rated 4 or higher
« Reply #3 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

Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Smartlist of albums that contain 4 or more songs rated 4 or higher
« Reply #4 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

Logged
Pages: [1]   Go Up