Use correct MediaInfo method
This commit is contained in:
parent
24c5016f48
commit
8e05b22645
|
@ -6,6 +6,7 @@ using System.Net.Http;
|
|||
using System.Threading.Tasks;
|
||||
using Jellyfin.Api.Constants;
|
||||
using Jellyfin.Api.Helpers;
|
||||
using Jellyfin.Api.Models.VideoDtos;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Devices;
|
||||
|
@ -151,7 +152,18 @@ namespace Jellyfin.Api.Controllers
|
|||
_authorizationContext.GetAuthorizationInfo(Request).DeviceId = deviceId;
|
||||
|
||||
var mediaInfoController = new MediaInfoController(_mediaSourceManager, _deviceManager, _libraryManager, _networkManager, _mediaEncoder, _userManager, _authorizationContext, _loggerFactory.CreateLogger<MediaInfoController>(), _serverConfigurationManager);
|
||||
var playbackInfoResult = await mediaInfoController.GetPlaybackInfo(itemId, userId).ConfigureAwait(false);
|
||||
var playbackInfoResult = await mediaInfoController.GetPostedPlaybackInfo(
|
||||
itemId,
|
||||
userId,
|
||||
maxStreamingBitrate,
|
||||
startTimeTicks,
|
||||
null,
|
||||
null,
|
||||
maxAudioChannels,
|
||||
mediaSourceId,
|
||||
null,
|
||||
new DeviceProfileDto { DeviceProfile = deviceProfile })
|
||||
.ConfigureAwait(false);
|
||||
var mediaSource = playbackInfoResult.Value.MediaSources[0];
|
||||
|
||||
if (mediaSource.SupportsDirectPlay && mediaSource.Protocol == MediaProtocol.Http)
|
||||
|
|
Loading…
Reference in New Issue
Block a user