Post Reply 
Wrong sorting with Album.ignore.sort
01-01-2025, 09:38
Post: #1
Wrong sorting with Album.ignore.sort
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
Find all posts by this user
Quote this message in a reply
01-01-2025, 14:37
Post: #2
RE: Wrong sorting with Album.ignore.sort
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.
Find all posts by this user
Quote this message in a reply
01-01-2025, 22:06
Post: #3
RE: Wrong sorting with Album.ignore.sort
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.
Find all posts by this user
Quote this message in a reply
02-01-2025, 00:05
Post: #4
RE: Wrong sorting with Album.ignore.sort
(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}
Find all posts by this user
Quote this message in a reply
02-01-2025, 12:06
Post: #5
RE: Wrong sorting with Album.ignore.sort
(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.
Find all posts by this user
Quote this message in a reply
04-01-2025, 19:58
Post: #6
Thumbs Up RE: Wrong sorting with Album.ignore.sort
(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.
Find all posts by this user
Quote this message in a reply
28-01-2025, 22:01
Post: #7
RE: Wrong sorting with Album.ignore.sort
This change is now available in MinimServer update 257.
Find all posts by this user
Quote this message in a reply
29-05-2025, 20:11
Post: #8
RE: Wrong sorting with Album.ignore.sort
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?
Find all posts by this user
Quote this message in a reply
29-05-2025, 20:36
Post: #9
RE: Wrong sorting with Album.ignore.sort
Where are you seeing this? A sort value should not be displayed to the user, only used for sorting a list of names.
Find all posts by this user
Quote this message in a reply
29-05-2025, 22:32 (This post was last modified: 29-05-2025 23:29 by Hagu.)
Post: #10
RE: Wrong sorting with Album.ignore.sort
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
...
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: