diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-01-26 11:47:15 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-01-26 11:47:15 -0500 |
| commit | 63f3cf97dada179fc6e9e3a177504d3e7b36321c (patch) | |
| tree | b6810d34b9bc46d61e8565ec4fc0f0c178cd0b35 /MediaBrowser.Controller/Playlists | |
| parent | 91416cb8a83eadde908e810afea981b6e4bed234 (diff) | |
add option to merge metadata and IBN paths
Diffstat (limited to 'MediaBrowser.Controller/Playlists')
| -rw-r--r-- | MediaBrowser.Controller/Playlists/Playlist.cs | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/MediaBrowser.Controller/Playlists/Playlist.cs b/MediaBrowser.Controller/Playlists/Playlist.cs index 071a9bf934..0f0c6a97ed 100644 --- a/MediaBrowser.Controller/Playlists/Playlist.cs +++ b/MediaBrowser.Controller/Playlists/Playlist.cs @@ -113,38 +113,17 @@ namespace MediaBrowser.Controller.Playlists return LibraryManager.Sort(items, user, new[] { ItemSortBy.AlbumArtist, ItemSortBy.Album, ItemSortBy.SortName }, SortOrder.Ascending); } - // Grab these explicitly to avoid the sorting that will happen below - var collection = item as BoxSet; - if (collection != null) - { - var items = user == null - ? collection.Children - : collection.GetChildren(user, true); - - return items - .Where(m => !m.IsFolder); - } - - // Grab these explicitly to avoid the sorting that will happen below - var season = item as Season; - if (season != null) - { - var items = user == null - ? season.Children - : season.GetChildren(user, true); - - return items - .Where(m => !m.IsFolder); - } - var folder = item as Folder; - if (folder != null) { var items = user == null ? folder.GetRecursiveChildren(m => !m.IsFolder) : folder.GetRecursiveChildren(user, m => !m.IsFolder); + if (folder.IsPreSorted) + { + return items; + } return LibraryManager.Sort(items, user, new[] { ItemSortBy.SortName }, SortOrder.Ascending); } |
