MinimServer Forum
Wrong sorting with Album.ignore.sort - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: Support (/forumdisplay.php?fid=4)
+--- Thread: Wrong sorting with Album.ignore.sort (/showthread.php?tid=7421)

Pages: 1 2


Wrong sorting with Album.ignore.sort - thr - 01-01-2025 09:38

Hi,

to ignore articles at the beginning of album names I'm using this option in tagOptions:

Code:
Album.ignore.sort={A,The}

It works, except the sorting is slightly wrong. For example, I have the three albums:
  • The Matrix
  • The Matrix Reloaded
  • The Matrix Revolutions

With the aforementioned option set in tagOptions, these albums are sorted in the order:
  • The Matrix Reloaded
  • The Matrix Revolutions
  • The Matrix

I assume that's happening because the stripped-off prefix is appended at the end before sorting, like this:
  • Matrix, The
  • Matrix Reloaded, The
  • Matrix Revolutions, The

But for sorting purposes it should not be appended at all.


Best regards,
Thomas


RE: Wrong sorting with Album.ignore.sort - simoncn - 01-01-2025 14:37

Thanks for reporting this. You are correct that ignore.sort appends the prefix at the end of the string, causing the slightly wrong sort order you have described.

Ignoring the prefix completely for sorting purposes could cause other problems, such as "The Dream" being sorted before "A Dream". On balance I think it is better to use the prefix as part of the sort rather than completely ignoring it.


RE: Wrong sorting with Album.ignore.sort - thr - 01-01-2025 22:06

Would it be possible to do the sorting in a multi-level approach then? Don't sort by the whole string, but first by the string without prefix and then, in case of a tie, by the prefix.


RE: Wrong sorting with Album.ignore.sort - simbun - 02-01-2025 00:05

(01-01-2025 22:06)thr Wrote:  Would it be possible to do the sorting in a multi-level approach then? Don't sort by the whole string, but first by the string without prefix and then, in case of a tie, by the prefix.

I am in no way dismissing your suggestion as it seem like a sensible one, but another option would be to use the ALBUMSORT tag to explicitly set the value you want used for sorting e.g.
Code:
ALBUM                                                   ALBUMSORT
Guardians Of The Galaxy: Awesome Mix Vol․ 1            Guardians Of The Galaxy 1
Guardians Of The Galaxy Vol․ 2: Awesome Mix Vol․ 2     Guardians Of The Galaxy 2
Guardians Of The Galaxy Vol․ 3: Awesome Mix Vol․ 3     Guardians Of The Galaxy 3

MinimServer Configuration:
Code:
itemTags: AlbumSort
tagOptions: Album.sortTags={AlbumSort}
tagValue: AlbumSort.default={Album}



RE: Wrong sorting with Album.ignore.sort - simoncn - 02-01-2025 12:06

(01-01-2025 22:06)thr Wrote:  Would it be possible to do the sorting in a multi-level approach then? Don't sort by the whole string, but first by the string without prefix and then, in case of a tie, by the prefix.

This would work but is difficult to implement because of the way MinimServer handles tag sorting. I think the same result could be achieved by using a different sort value string when the ignore.sort option is specified. At present, the sort value is:

Matrix, A
Matrix, The
Matrix Reloaded, The
Matrix Revolutions, The

Changing these sort values to:

Matrix ! A
Matrix ! The
Matrix Reloaded ! The
Matrix Revolutions ! The

should produce the correct sort order.


RE: Wrong sorting with Album.ignore.sort - thr - 04-01-2025 19:58

(02-01-2025 12:06)simoncn Wrote:  Changing these sort values to:

Matrix ! A
Matrix ! The
Matrix Reloaded ! The
Matrix Revolutions ! The

should produce the correct sort order.

This seems like a good solution. I'd very much appreciate if this could be implemented.


RE: Wrong sorting with Album.ignore.sort - simoncn - 28-01-2025 22:01

This change is now available in MinimServer update 257.


RE: Wrong sorting with Album.ignore.sort - Hagu - 29-05-2025 20:11

Beatles, The
was nice in my eyes ...
I don't like the new solution with the exclamation mark like
Beatles ! The
that looks ugly ...

Is there a possibility to go back to the comma?


RE: Wrong sorting with Album.ignore.sort - simoncn - 29-05-2025 20:36

Where are you seeing this? A sort value should not be displayed to the user, only used for sorting a list of names.


RE: Wrong sorting with Album.ignore.sort - Hagu - 29-05-2025 22:32

In any control point ...
But sorry, ich meant Artist.ignore.index.sort={The}, AlbumArtist.ignore.index.sort={The}

Album.ignore.sort={"The"} is no problem

When you go to "Interpret" there is now a list like:
...
Beatles ! The
Blues Brothers ! The
Bothy Band ! The
...

In the past it was:
...
Beatles, The
Blues Brothers, The
Bothy Band, The
...