The Free Software Media System - Server Backend & API
Fix PlaybackInfo endpoint
crobiberodf5d43132cd7
diff --git a/Jellyfin.Api/Controllers/MediaInfoController.cs b/Jellyfin.Api/Controllers/MediaInfoController.csindex da400f5106..c2c02c02ca 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.VideoDtos;using Jellyfin.Data.Entities;using Jellyfin.Data.Enums;using MediaBrowser.Common.Net;@@ -126,7 +127,7 @@ namespace Jellyfin.Api.Controllers[FromQuery] int? maxAudioChannels,[FromQuery] string? mediaSourceId,[FromQuery] string? liveStreamId,- [FromQuery] DeviceProfile? deviceProfile,+ [FromBody] DeviceProfileDto? deviceProfile,[FromQuery] bool autoOpenLiveStream = false,[FromQuery] bool enableDirectPlay = true,[FromQuery] bool enableDirectStream = true,@@ -136,7 +137,7 @@ namespace Jellyfin.Api.Controllers{var authInfo = _authContext.GetAuthorizationInfo(Request);- var profile = deviceProfile;+ var profile = deviceProfile?.DeviceProfile;_logger.LogInformation("GetPostedPlaybackInfo profile: {@Profile}", profile);@@ -190,7 +191,7 @@ namespace Jellyfin.Api.Controllersvar openStreamResult = await OpenMediaSource(new LiveStreamRequest{AudioStreamIndex = audioStreamIndex,- DeviceProfile = deviceProfile,+ DeviceProfile = deviceProfile?.DeviceProfile,EnableDirectPlay = enableDirectPlay,EnableDirectStream = enableDirectStream,ItemId = itemId,diff --git a/Jellyfin.Api/Models/VideoDtos/DeviceProfileDto.cs b/Jellyfin.Api/Models/VideoDtos/DeviceProfileDto.csnew file mode 100644index 0000000000..db55dc34b5--- /dev/null+++ b/Jellyfin.Api/Models/VideoDtos/DeviceProfileDto.cs@@ -0,0 +1,15 @@+using MediaBrowser.Model.Dlna;++namespace Jellyfin.Api.Models.VideoDtos+{+ /// <summary>+ /// Device profile dto.+ /// </summary>+ public class DeviceProfileDto+ {+ /// <summary>+ /// Gets or sets device profile.+ /// </summary>+ public DeviceProfile? DeviceProfile { get; set; }+ }+}