mirror of https://github.com/jellyfin/jellyfin.git
update progress ping
This commit is contained in:
parent
952f34c832
commit
ca308bc3c9
|
@ -63,6 +63,15 @@ namespace MediaBrowser.Api
|
|||
_mediaSourceManager = mediaSourceManager;
|
||||
|
||||
Instance = this;
|
||||
_sessionManager.PlaybackProgress += _sessionManager_PlaybackProgress;
|
||||
}
|
||||
|
||||
void _sessionManager_PlaybackProgress(object sender, PlaybackProgressEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(e.PlaySessionId))
|
||||
{
|
||||
PingTranscodingJob(e.PlaySessionId, e.IsPaused);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -335,11 +335,6 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
|
||||
public void Post(ReportPlaybackProgress request)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(request.PlaySessionId))
|
||||
{
|
||||
ApiEntryPoint.Instance.PingTranscodingJob(request.PlaySessionId, request.IsPaused);
|
||||
}
|
||||
|
||||
request.SessionId = GetSession().Result.Id;
|
||||
|
||||
var task = _sessionManager.OnPlaybackProgress(request);
|
||||
|
|
|
@ -15,11 +15,14 @@ namespace MediaBrowser.Controller.Library
|
|||
public BaseItem Item { get; set; }
|
||||
public BaseItemInfo MediaInfo { get; set; }
|
||||
public string MediaSourceId { get; set; }
|
||||
public bool IsPaused { get; set; }
|
||||
|
||||
public string DeviceId { get; set; }
|
||||
public string DeviceName { get; set; }
|
||||
public string ClientName { get; set; }
|
||||
|
||||
public string PlaySessionId { get; set; }
|
||||
|
||||
public PlaybackProgressEventArgs()
|
||||
{
|
||||
Users = new List<User>();
|
||||
|
|
|
@ -705,7 +705,9 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||
MediaInfo = info.Item,
|
||||
DeviceName = session.DeviceName,
|
||||
ClientName = session.Client,
|
||||
DeviceId = session.DeviceId
|
||||
DeviceId = session.DeviceId,
|
||||
IsPaused = info.IsPaused,
|
||||
PlaySessionId = info.PlaySessionId
|
||||
|
||||
}, _logger);
|
||||
|
||||
|
|
Loading…
Reference in New Issue