aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/ItemsService.cs
diff options
context:
space:
mode:
authorLogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>2019-01-23 00:31:35 -0800
committerGitHub <noreply@github.com>2019-01-23 00:31:35 -0800
commit404bd04cbc17dc8c8bf4a5c9aa3ca9c5cd85aa68 (patch)
tree3d267c6ceef9439a034c113095e10e4d619e7c70 /MediaBrowser.Api/UserLibrary/ItemsService.cs
parent8ff89fdc0c30f595a171ffc550f907ef22b6212a (diff)
parente05e002b8bb4d13eb2b80b56a0aad8903ddb701e (diff)
Merge pull request #8 from jellyfin/master
rebase to latest master
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs26
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)