mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-19 15:33:03 +03:00
Merge pull request #764 from Bond-009/encoding
Remove dead code, made some functions properly async
This commit is contained in:
@@ -366,9 +366,9 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
/// Posts the specified request.
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
public void Delete(OnPlaybackStopped request)
|
||||
public Task Delete(OnPlaybackStopped request)
|
||||
{
|
||||
Post(new ReportPlaybackStopped
|
||||
return Post(new ReportPlaybackStopped
|
||||
{
|
||||
ItemId = new Guid(request.Id),
|
||||
PositionTicks = request.PositionTicks,
|
||||
@@ -379,20 +379,18 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
});
|
||||
}
|
||||
|
||||
public void Post(ReportPlaybackStopped request)
|
||||
public async Task Post(ReportPlaybackStopped request)
|
||||
{
|
||||
Logger.LogDebug("ReportPlaybackStopped PlaySessionId: {0}", request.PlaySessionId ?? string.Empty);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(request.PlaySessionId))
|
||||
{
|
||||
ApiEntryPoint.Instance.KillTranscodingJobs(_authContext.GetAuthorizationInfo(Request).DeviceId, request.PlaySessionId, s => true);
|
||||
await ApiEntryPoint.Instance.KillTranscodingJobs(_authContext.GetAuthorizationInfo(Request).DeviceId, request.PlaySessionId, s => true);
|
||||
}
|
||||
|
||||
request.SessionId = GetSession(_sessionContext).Id;
|
||||
|
||||
var task = _sessionManager.OnPlaybackStopped(request);
|
||||
|
||||
Task.WaitAll(task);
|
||||
await _sessionManager.OnPlaybackStopped(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user