INTERACT FORUM

Please login or register.

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

Author Topic: Sort by Album Artist and later by Album Year?  (Read 2337 times)

mikolajek

  • Recent member
  • *
  • Posts: 48
Sort by Album Artist and later by Album Year?
« on: September 17, 2017, 09:50:20 am »

I'm tryning to build a custom field that would allow me to create a Details view that would do two things:
- group songs by Album Artis and Album
- Sort them by the year the Album was released in descending order.

So I effectively want list like this:
Artist A - Album A (2017)
Artist A - Album B (2016)
Artist B - Album G (2005)
Artist B - Album H (1999)
Artist C - Album X (2017)

I've already tried different combinations of and ListComboine ListSort commands (e.g. ListCombine([Album Artist] - [Album], (ListSort([Year], 1))), but since I want the Year as the last parameter, I each time end up with sorting by Album Artist only... Is anyone able to help with this? Much appreciated!


Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Sort by Album Artist and later by Album Year?
« Reply #1 on: September 17, 2017, 11:40:14 am »

You might post a screen shot of the view you are trying to customize and point out the area you want to sort in.  This stuff gets really detailed, so it would be best to have more information.

Brian.
Logged

mikolajek

  • Recent member
  • *
  • Posts: 48
Re: Sort by Album Artist and later by Album Year?
« Reply #2 on: September 17, 2017, 12:18:11 pm »

Well, it's the Audio => Genres section, when I display all files of all genres or of a given genre. List style is set to details and it looks like in the image below:


As you see the list is sorted by Album Artist, which is OK but I need a "2nd level" of sorting, meaning I want to display the given Artist's albums starting from the most recent.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Sort by Album Artist and later by Album Year?
« Reply #3 on: September 17, 2017, 03:02:31 pm »

OK, I understand.  That's an unusual view ... well it is for me because I don't use the tree for navigation within a view like you are.  So I normally would see that "details" view underneath a list of albums with would just be the album cover plus the text underneath.

So this is a weird part of MC.  The sorting of that details area is entirely determined by the text above each album.  That text is generated by a field.  So the "group by" that you select for the details area actually determines the grouping *and* sorting at the same time.

I made a new field that I called "artist -year - album " and made it a calculated expression of [Album Artist (auto)] [Year] [Album] .  This produced *almost* what you want, expect that it's sorted by *ascending* year not descending as you want.

I took another shot at it and made that field contain a calculated value of 3000 - Year .  This makes it sort by inverse year.  BUt then you have that weird number in the header of each album in that display.  Finally, I used HMTL font properties to set that part of the display to black so it wouldn't show.  The result is in the attached picture.

The final calculated value field is:

Code: [Select]
[Album Artist (auto)]<font color="000000">math(3000 - [Year])<//font>[Album] /([Year]/)
This isn't the cleanest prettiest display, but it's not too bad.  You could try tweaking it a bit more and see what you come up with.

Brian.

Logged

mikolajek

  • Recent member
  • *
  • Posts: 48
Re: Sort by Album Artist and later by Album Year?
« Reply #4 on: September 17, 2017, 03:17:52 pm »

Interesting, many thanks for this! I'll definitely play more and see if I can pull more out of this!

It seems that sorting works following the order of parameters used - so I'd need to put the year first to get what I want :(

So no direct function to apply dual sorting... Then it's something to be put on the development plan! :)
Logged
Pages: [1]   Go Up