aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/VideosService.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2019-12-10 23:00:59 +0100
committerBond_009 <bond.009@outlook.com>2019-12-10 23:00:59 +0100
commit0bf8bfbb0cfd67b387a574148022f3c554ff5173 (patch)
tree34f12fcce7b688fc50d377f90dbccc343e03b310 /MediaBrowser.Api/VideosService.cs
parentc6d48f51f608601775d98fc7866eefc367bfd63b (diff)
parent67922dff50967c02e8c0c10f43884fd4e788b012 (diff)
Merge branch 'master' into mediaencoding
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>