Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/MP1-4981-Wrong_sort_orde…
Browse files Browse the repository at this point in the history
…r_in_some_MusicViews' into MP_1.23.100_Pre_Release_Test5
  • Loading branch information
Azzuro committed Jan 6, 2020
2 parents 172f148 + 4ea958b commit 2bf493b
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions mediaportal/WindowPlugins/Common.GUIPlugins/Music/MusicSort.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2bf493b

Please sign in to comment.