Skip to content
Permalink
Browse files

MP1-4981: Wrong sort order in some MusicViews

  • Loading branch information
andrewjswan committed Jan 5, 2020
1 parent 1c1f3b0 commit 73b9262bcaf13e848bac5b6504cb79c6bcbb883c
Showing with 16 additions and 4 deletions.
  1. +16 −4 mediaportal/WindowPlugins/Common.GUIPlugins/Music/MusicSort.cs
@@ -327,13 +327,14 @@ public int Compare(GUIListItem item1, GUIListItem item2)
}

case SortMethod.AlbumArtist:
// sort by AlbumArtist => Album
if (tag1 != null)
{
strAlbumArtist1 = tag1.AlbumArtist;
strAlbumArtist1 = tag1.AlbumArtist + " - " + tag1.Album;
}
if (tag2 != null)
{
strAlbumArtist2 = tag2.AlbumArtist;
strAlbumArtist2 = tag2.AlbumArtist + " - " + tag2.Album;
}
if (bAscending)
{
@@ -466,8 +467,19 @@ public int Compare(GUIListItem item1, GUIListItem item2)
}

case SortMethod.FileType:
string strFileType1 = tag1.FileType;
string strFileType2 = tag2.FileType;
// sort by FileType => Album
string strFileType1 = "";
string strFileType2 = "";

if (tag1 != null)
{
strFileType1 = tag1.FileType + " - " + tag1.Album;
}
if (tag2 != null)
{
strFileType2 = tag2.FileType + " - " + tag2.Album;
}

if (bAscending)
{
return Util.StringLogicalComparer.Compare(strFileType1, strFileType2);

0 comments on commit 73b9262

Please sign in to comment.
You can’t perform that action at this time.