From 73b9262bcaf13e848bac5b6504cb79c6bcbb883c Mon Sep 17 00:00:00 2001 From: "Andrew J.Swan" Date: Sun, 5 Jan 2020 13:13:29 +0200 Subject: [PATCH 1/2] MP1-4981: Wrong sort order in some MusicViews --- .../Common.GUIPlugins/Music/MusicSort.cs | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/mediaportal/WindowPlugins/Common.GUIPlugins/Music/MusicSort.cs b/mediaportal/WindowPlugins/Common.GUIPlugins/Music/MusicSort.cs index b3704b65ac9..17dfcc65c3e 100644 --- a/mediaportal/WindowPlugins/Common.GUIPlugins/Music/MusicSort.cs +++ b/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); From 4ea958b6ccb7b8df9f31fb140a2d8e44a4f8eef7 Mon Sep 17 00:00:00 2001 From: "Andrew J.Swan" Date: Sun, 5 Jan 2020 13:55:58 +0200 Subject: [PATCH 2/2] MP1-4981: Wrong sort order in some MusicViews (update year in Copyright) --- .../WindowPlugins/Common.GUIPlugins/Music/MusicSort.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mediaportal/WindowPlugins/Common.GUIPlugins/Music/MusicSort.cs b/mediaportal/WindowPlugins/Common.GUIPlugins/Music/MusicSort.cs index 17dfcc65c3e..45e115093a5 100644 --- a/mediaportal/WindowPlugins/Common.GUIPlugins/Music/MusicSort.cs +++ b/mediaportal/WindowPlugins/Common.GUIPlugins/Music/MusicSort.cs @@ -1,6 +1,6 @@ -#region Copyright (C) 2005-2011 Team MediaPortal +#region Copyright (C) 2005-2020 Team MediaPortal -// Copyright (C) 2005-2011 Team MediaPortal +// Copyright (C) 2005-2020 Team MediaPortal // http://www.team-mediaportal.com // // MediaPortal is free software: you can redistribute it and/or modify