INTERACT FORUM

Please login or register.

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

Author Topic: ExpreSort the best album  (Read 1017 times)

subway33

  • Recent member
  • *
  • Posts: 20
ExpreSort the best album
« on: January 12, 2021, 04:03:36 am »


I have tried to find the way on the wiki how to do this, but I can't find a solution.

I would love to classify my library with the best albums, for that the gauge would be:
* on albums where there are 3 or more songs classified with 4 or 5 stars, it would be classified as a "best Of"

What would be the expression to use for this purpose ?! ::)

Thank you in advance
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: ExpreSort the best album
« Reply #1 on: January 12, 2021, 05:51:57 am »

Welcome to the forums, subway.

Since this is your first post, I have to ask, how familiar are you with setting up views.  If you have zero experience with it, you need to walk before you can run, and you'll need to look at some tutorials on customizing views.

For what you want, it's not just a simple expression.

For your specific question, sorting your albums so that the ones with the highest average rating (across all the tracks included in the view) is not too difficult.  Getting only albums where there at least 3 songs with ratings >= 4 might be tricky.

It's also easy to exclude songs with low ratings.
Logged

subway33

  • Recent member
  • *
  • Posts: 20
Re: ExpreSort the best album
« Reply #2 on: January 12, 2021, 06:46:48 am »

Thanks Wer for promt answer!

I am a longtime MC user for audio and movies. I am very familiar with the MC and I have learned a lot in the forums, whether in obtaining views or expressions..

I have a long list of artists and I would like if possible to get a list with my best albums listened based in this criteria.

By for now.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: ExpreSort the best album
« Reply #3 on: January 12, 2021, 06:55:30 am »

If you know the basics like wer suggested.......
......you can e.g. create helper smartlist "Set Top Albums" like this (import below expression to smartlist). It will save global value for [AlbumArtist (auto)][Album] pair how many >3 rated songs such pairs (albums) have.

Code: [Select]
[Media Type]=[Audio] -[Album]=[] [=Save(0,v_GoodTracks[Album Artist (auto)][Album])1]=1 [=If(Compare([Rating],>,3),SaveAdd(v_GoodTracks[Album Artist (auto)][Album],1,0),)1]=1
Then you can use that playlist in your view and show only files which have more than 2 Good Tracks
Like this.. You can of course adjust the look of the view otherwise as you want. NOTE that your playlistid will be different so use UI to select your newly created playlist to be source for your view
Code: [Select]
playlistid==514233869 [=Compare(Load(v_GoodTracks[Album Artist (auto)][Album]),>,2)]=1
Also if this is the only place (view) you need this "TopAlbum data" I think you don't need to create separate playlist but you can set global variables within the view as a first filters. Playlist just cleans up things a bit and make the rules easier to use elsewhere
Logged

subway33

  • Recent member
  • *
  • Posts: 20
Re: ExpreSort the best album
« Reply #4 on: January 12, 2021, 07:08:52 am »

@lepa

You are outstanding! :o
I will give a try later.

Thank you so much for your patience.

Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: ExpreSort the best album
« Reply #5 on: January 12, 2021, 08:15:59 am »

Also an example View with instructions how to make needed smart list (expression to import as a smart list rule )
Logged

subway33

  • Recent member
  • *
  • Posts: 20
Re: ExpreSort the best album
« Reply #6 on: January 12, 2021, 09:55:56 am »

@Lepa WOW! works like charm. ;D

Thanks again for your help!
That's exactly what i was looking for...

Have a nice day.
Best regards




Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: ExpreSort the best album
« Reply #7 on: January 12, 2021, 10:56:54 am »

You're welcome and thanks for reporting back
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: ExpreSort the best album
« Reply #8 on: January 12, 2021, 01:17:15 pm »

Good grief, lepa. Handiing someone a solution with global variables for their first post on the forum must be some kind of record!  :o  Talk about jumping into the deep end...
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: ExpreSort the best album
« Reply #9 on: January 12, 2021, 03:11:43 pm »

Nah, that was easy-peasy.  :D
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: ExpreSort the best album
« Reply #10 on: January 13, 2021, 05:07:50 am »

when you add a new album, you'll need to re-open the smartlist to re-calculate the variables to include the new album

nice work lepa!
Logged

subway33

  • Recent member
  • *
  • Posts: 20
Re: ExpreSort the best album
« Reply #11 on: January 13, 2021, 05:12:01 am »

when you add a new album, you'll need to re-open the smartlist to re-calculate the variables to include the new album

nice work lepa!

Yeap!
Logged

subway33

  • Recent member
  • *
  • Posts: 20
Re: ExpreSort the best album
« Reply #12 on: January 13, 2021, 05:13:23 am »

Good grief, lepa. Handiing someone a solution with global variables for their first post on the forum must be some kind of record!  :o  Talk about jumping into the deep end...
I think I deserve it, after more 10 years of user MC ...

Thanks to all!
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2036
Re: ExpreSort the best album
« Reply #13 on: January 13, 2021, 06:36:29 am »

when you add a new album, you'll need to re-open the smartlist to re-calculate the variables to include the new album
You can test to verify but I think that because smartlist is included to view the calculations are done every time (also smartlist gets refreshed) you open the view and it is refreshed. So opening view takes a little more time but you always get up to date data.

E: Checked this and yes smartlist is also refreshed when view is refreshed i.e. opened or F5 is pressed so no need to go to manually refresh the smartlist
Logged
Pages: [1]   Go Up