diff options
| author | Patrick Barron <18354464+barronpm@users.noreply.github.com> | 2020-08-03 21:45:15 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-03 21:45:15 +0000 |
| commit | 8385c5459142e69eb4004d32b3d772b998c37b0b (patch) | |
| tree | 0cf20aa76ec8eb100dd8d7adc850c6c1009011eb /Jellyfin.Api/Controllers/MediaInfoController.cs | |
| parent | a28d00eebaec733d0c3b4e85da95c1e466189883 (diff) | |
| parent | dee7bdddb6f5ce0cc09dc2b20d4dab9747eea9f0 (diff) | |
Merge pull request #3811 from crobibero/api-cleanup
Clean up api-migration branch
Diffstat (limited to 'Jellyfin.Api/Controllers/MediaInfoController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/MediaInfoController.cs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Jellyfin.Api/Controllers/MediaInfoController.cs b/Jellyfin.Api/Controllers/MediaInfoController.cs index c2c02c02c..5b0f46b02 100644 --- a/Jellyfin.Api/Controllers/MediaInfoController.cs +++ b/Jellyfin.Api/Controllers/MediaInfoController.cs @@ -7,6 +7,7 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Jellyfin.Api.Constants; +using Jellyfin.Api.Models.MediaInfoDtos; using Jellyfin.Api.Models.VideoDtos; using Jellyfin.Data.Entities; using Jellyfin.Data.Enums; @@ -43,7 +44,7 @@ namespace Jellyfin.Api.Controllers private readonly IMediaEncoder _mediaEncoder; private readonly IUserManager _userManager; private readonly IAuthorizationContext _authContext; - private readonly ILogger _logger; + private readonly ILogger<MediaInfoController> _logger; private readonly IServerConfigurationManager _serverConfigurationManager; /// <summary> @@ -91,7 +92,7 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status200OK)] public async Task<ActionResult<PlaybackInfoResponse>> GetPlaybackInfo([FromRoute] Guid itemId, [FromQuery] Guid? userId) { - return await GetPlaybackInfoInternal(itemId, userId, null, null).ConfigureAwait(false); + return await GetPlaybackInfoInternal(itemId, userId).ConfigureAwait(false); } /// <summary> @@ -231,8 +232,7 @@ namespace Jellyfin.Api.Controllers /// <param name="subtitleStreamIndex">The subtitle stream index.</param> /// <param name="maxAudioChannels">The maximum number of audio channels.</param> /// <param name="itemId">The item id.</param> - /// <param name="deviceProfile">The device profile.</param> - /// <param name="directPlayProtocols">The direct play protocols. Default: <see cref="MediaProtocol.Http"/>.</param> + /// <param name="openLiveStreamDto">The open live stream dto.</param> /// <param name="enableDirectPlay">Whether to enable direct play. Default: true.</param> /// <param name="enableDirectStream">Whether to enable direct stream. Default: true.</param> /// <response code="200">Media source opened.</response> @@ -249,8 +249,7 @@ namespace Jellyfin.Api.Controllers [FromQuery] int? subtitleStreamIndex, [FromQuery] int? maxAudioChannels, [FromQuery] Guid? itemId, - [FromQuery] DeviceProfile? deviceProfile, - [FromQuery] MediaProtocol[] directPlayProtocols, + [FromBody] OpenLiveStreamDto openLiveStreamDto, [FromQuery] bool enableDirectPlay = true, [FromQuery] bool enableDirectStream = true) { @@ -265,10 +264,10 @@ namespace Jellyfin.Api.Controllers SubtitleStreamIndex = subtitleStreamIndex, MaxAudioChannels = maxAudioChannels, ItemId = itemId ?? Guid.Empty, - DeviceProfile = deviceProfile, + DeviceProfile = openLiveStreamDto?.DeviceProfile, EnableDirectPlay = enableDirectPlay, EnableDirectStream = enableDirectStream, - DirectPlayProtocols = directPlayProtocols ?? new[] { MediaProtocol.Http } + DirectPlayProtocols = openLiveStreamDto?.DirectPlayProtocols ?? new[] { MediaProtocol.Http } }; return await OpenMediaSource(request).ConfigureAwait(false); } |
