aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/VideosService.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-12-18 11:53:41 +0100
committerBond-009 <bond.009@outlook.com>2019-12-18 11:53:41 +0100
commita1ca50fd5a74eafa6e609976d90cad42b54137e5 (patch)
tree9c64d6914c27a8d7e2f8e6f71d7a5952197705cf /MediaBrowser.Api/VideosService.cs
parent8723bdbb4fb73ed261ac1ba3b6932773e523d78b (diff)
parent6b185119aa329764c1ccc57d9be3e81f05680b69 (diff)
Merge branch 'namingtests' of https://github.com/Bond-009/jellyfin into namingtests
Diffstat (limited to 'MediaBrowser.Api/VideosService.cs')
-rw-r--r--MediaBrowser.Api/VideosService.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/MediaBrowser.Api/VideosService.cs b/MediaBrowser.Api/VideosService.cs
index 474036f5c..46b6d5a94 100644
--- a/MediaBrowser.Api/VideosService.cs
+++ b/MediaBrowser.Api/VideosService.cs
@@ -7,11 +7,10 @@ using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net;
-using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.IO;
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Services;
+using Microsoft.Extensions.Logging;
namespace MediaBrowser.Api
{
@@ -51,19 +50,21 @@ namespace MediaBrowser.Api
private readonly ILibraryManager _libraryManager;
private readonly IUserManager _userManager;
private readonly IDtoService _dtoService;
- private readonly IFileSystem _fileSystem;
- private readonly IItemRepository _itemRepo;
- private readonly IServerConfigurationManager _config;
private readonly IAuthorizationContext _authContext;
- public VideosService(ILibraryManager libraryManager, IUserManager userManager, IDtoService dtoService, IItemRepository itemRepo, IFileSystem fileSystem, IServerConfigurationManager config, IAuthorizationContext authContext)
+ public VideosService(
+ ILogger<VideosService> logger,
+ IServerConfigurationManager serverConfigurationManager,
+ IHttpResultFactory httpResultFactory,
+ ILibraryManager libraryManager,
+ IUserManager userManager,
+ IDtoService dtoService,
+ IAuthorizationContext authContext)
+ : base(logger, serverConfigurationManager, httpResultFactory)
{
_libraryManager = libraryManager;
_userManager = userManager;
_dtoService = dtoService;
- _itemRepo = itemRepo;
- _fileSystem = fileSystem;
- _config = config;
_authContext = authContext;
}
@@ -84,9 +85,8 @@ namespace MediaBrowser.Api
var dtoOptions = GetDtoOptions(_authContext, request);
- var video = item as Video;
BaseItemDto[] items;
- if (video != null)
+ if (item is Video video)
{
items = video.GetAdditionalParts()
.Select(i => _dtoService.GetBaseItemDto(i, dtoOptions, user, video))
@@ -94,7 +94,7 @@ namespace MediaBrowser.Api
}
else
{
- items = new BaseItemDto[] { };
+ items = Array.Empty<BaseItemDto>();
}
var result = new QueryResult<BaseItemDto>