From 01fd42cf9555d85469c07ce3d0c0e5842359eb2b Mon Sep 17 00:00:00 2001 From: Patrick Barron Date: Thu, 9 Nov 2023 14:42:37 -0500 Subject: Remove DLNA API code --- Jellyfin.Api/Controllers/VideosController.cs | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'Jellyfin.Api/Controllers/VideosController.cs') diff --git a/Jellyfin.Api/Controllers/VideosController.cs b/Jellyfin.Api/Controllers/VideosController.cs index 7aa5d01e2..5d9868eb9 100644 --- a/Jellyfin.Api/Controllers/VideosController.cs +++ b/Jellyfin.Api/Controllers/VideosController.cs @@ -16,8 +16,6 @@ using MediaBrowser.Common.Api; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Configuration; -using MediaBrowser.Controller.Devices; -using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; @@ -42,11 +40,9 @@ public class VideosController : BaseJellyfinApiController private readonly ILibraryManager _libraryManager; private readonly IUserManager _userManager; private readonly IDtoService _dtoService; - private readonly IDlnaManager _dlnaManager; private readonly IMediaSourceManager _mediaSourceManager; private readonly IServerConfigurationManager _serverConfigurationManager; private readonly IMediaEncoder _mediaEncoder; - private readonly IDeviceManager _deviceManager; private readonly TranscodingJobHelper _transcodingJobHelper; private readonly IHttpClientFactory _httpClientFactory; private readonly EncodingHelper _encodingHelper; @@ -59,11 +55,9 @@ public class VideosController : BaseJellyfinApiController /// Instance of the interface. /// Instance of the interface. /// Instance of the interface. - /// Instance of the interface. /// Instance of the interface. /// Instance of the interface. /// Instance of the interface. - /// Instance of the interface. /// Instance of the class. /// Instance of the interface. /// Instance of . @@ -71,11 +65,9 @@ public class VideosController : BaseJellyfinApiController ILibraryManager libraryManager, IUserManager userManager, IDtoService dtoService, - IDlnaManager dlnaManager, IMediaSourceManager mediaSourceManager, IServerConfigurationManager serverConfigurationManager, IMediaEncoder mediaEncoder, - IDeviceManager deviceManager, TranscodingJobHelper transcodingJobHelper, IHttpClientFactory httpClientFactory, EncodingHelper encodingHelper) @@ -83,11 +75,9 @@ public class VideosController : BaseJellyfinApiController _libraryManager = libraryManager; _userManager = userManager; _dtoService = dtoService; - _dlnaManager = dlnaManager; _mediaSourceManager = mediaSourceManager; _serverConfigurationManager = serverConfigurationManager; _mediaEncoder = mediaEncoder; - _deviceManager = deviceManager; _transcodingJobHelper = transcodingJobHelper; _httpClientFactory = httpClientFactory; _encodingHelper = encodingHelper; @@ -324,7 +314,7 @@ public class VideosController : BaseJellyfinApiController [FromQuery] bool? @static, [FromQuery] string? @params, [FromQuery] string? tag, - [FromQuery] string? deviceProfileId, + [FromQuery, ParameterObsolete] string? deviceProfileId, [FromQuery] string? playSessionId, [FromQuery] string? segmentContainer, [FromQuery] int? segmentLength, @@ -381,7 +371,6 @@ public class VideosController : BaseJellyfinApiController Static = @static ?? false, Params = @params, Tag = tag, - DeviceProfileId = deviceProfileId, PlaySessionId = playSessionId, SegmentContainer = segmentContainer, SegmentLength = segmentLength, @@ -438,8 +427,6 @@ public class VideosController : BaseJellyfinApiController _serverConfigurationManager, _mediaEncoder, _encodingHelper, - _dlnaManager, - _deviceManager, _transcodingJobHelper, _transcodingJobType, cancellationTokenSource.Token) @@ -447,8 +434,6 @@ public class VideosController : BaseJellyfinApiController if (@static.HasValue && @static.Value && state.DirectStreamProvider is not null) { - StreamingHelpers.AddDlnaHeaders(state, Response.Headers, true, state.Request.StartTimeTicks, Request, _dlnaManager); - var liveStreamInfo = _mediaSourceManager.GetLiveStreamInfo(streamingRequest.LiveStreamId); if (liveStreamInfo is null) { @@ -463,8 +448,6 @@ public class VideosController : BaseJellyfinApiController // Static remote stream if (@static.HasValue && @static.Value && state.InputProtocol == MediaProtocol.Http) { - StreamingHelpers.AddDlnaHeaders(state, Response.Headers, true, state.Request.StartTimeTicks, Request, _dlnaManager); - var httpClient = _httpClientFactory.CreateClient(NamedClient.Default); return await FileStreamResponseHelpers.GetStaticRemoteStreamResult(state, httpClient, HttpContext).ConfigureAwait(false); } @@ -475,12 +458,6 @@ public class VideosController : BaseJellyfinApiController } var outputPath = state.OutputFilePath; - var outputPathExists = System.IO.File.Exists(outputPath); - - var transcodingJob = _transcodingJobHelper.GetTranscodingJob(outputPath, TranscodingJobType.Progressive); - var isTranscodeCached = outputPathExists && transcodingJob is not null; - - StreamingHelpers.AddDlnaHeaders(state, Response.Headers, (@static.HasValue && @static.Value) || isTranscodeCached, state.Request.StartTimeTicks, Request, _dlnaManager); // Static stream if (@static.HasValue && @static.Value) -- cgit v1.2.3