diff options
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/ItemsService.cs | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index aa17e85f3..bf453576c 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -1,19 +1,17 @@ -using MediaBrowser.Controller.Dto; -using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Net; -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Querying; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; -using System.Threading.Tasks; +using MediaBrowser.Controller.Dto; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; +using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Net; using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Entities; using MediaBrowser.Model.Globalization; +using MediaBrowser.Model.Querying; using MediaBrowser.Model.Services; -using MediaBrowser.Model.Extensions; namespace MediaBrowser.Api.UserLibrary { @@ -62,19 +60,19 @@ namespace MediaBrowser.Api.UserLibrary { if (userManager == null) { - throw new ArgumentNullException("userManager"); + throw new ArgumentNullException(nameof(userManager)); } if (libraryManager == null) { - throw new ArgumentNullException("libraryManager"); + throw new ArgumentNullException(nameof(libraryManager)); } if (localization == null) { - throw new ArgumentNullException("localization"); + throw new ArgumentNullException(nameof(localization)); } if (dtoService == null) { - throw new ArgumentNullException("dtoService"); + throw new ArgumentNullException(nameof(dtoService)); } _userManager = userManager; @@ -143,7 +141,7 @@ namespace MediaBrowser.Api.UserLibrary { if (request == null) { - throw new ArgumentNullException("request"); + throw new ArgumentNullException(nameof(request)); } var result = GetItems(request); @@ -481,7 +479,7 @@ namespace MediaBrowser.Api.UserLibrary // Albums by artist if (query.ArtistIds.Length > 0 && query.IncludeItemTypes.Length == 1 && string.Equals(query.IncludeItemTypes[0], "MusicAlbum", StringComparison.OrdinalIgnoreCase)) { - query.OrderBy = new [] + query.OrderBy = new[] { new ValueTuple<string, SortOrder>(ItemSortBy.ProductionYear, SortOrder.Descending), new ValueTuple<string, SortOrder>(ItemSortBy.SortName, SortOrder.Ascending) |
