aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/PlaystateService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-04-01 21:34:14 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-04-01 21:34:14 -0400
commit967751d2a59db10dd91aa3cf31b0922a19269b5c (patch)
tree5d7a57003ffc1ca41ff5b51f46c55d28997682e7 /MediaBrowser.Api/UserLibrary/PlaystateService.cs
parent5d7f6b074409aed1f0c25b34153c563e46eb39c9 (diff)
rework hls timer
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/PlaystateService.cs')
-rw-r--r--MediaBrowser.Api/UserLibrary/PlaystateService.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/MediaBrowser.Api/UserLibrary/PlaystateService.cs b/MediaBrowser.Api/UserLibrary/PlaystateService.cs
index 55e1681e0..6c767596e 100644
--- a/MediaBrowser.Api/UserLibrary/PlaystateService.cs
+++ b/MediaBrowser.Api/UserLibrary/PlaystateService.cs
@@ -294,6 +294,11 @@ namespace MediaBrowser.Api.UserLibrary
public void Post(ReportPlaybackProgress request)
{
+ if (!string.IsNullOrWhiteSpace(request.PlaySessionId))
+ {
+ ApiEntryPoint.Instance.PingTranscodingJob(AuthorizationContext.GetAuthorizationInfo(Request).DeviceId, request.PlaySessionId);
+ }
+
request.SessionId = GetSession().Result.Id;
var task = _sessionManager.OnPlaybackProgress(request);
@@ -317,6 +322,11 @@ namespace MediaBrowser.Api.UserLibrary
public void Post(ReportPlaybackStopped request)
{
+ if (!string.IsNullOrWhiteSpace(request.PlaySessionId))
+ {
+ ApiEntryPoint.Instance.KillTranscodingJobs(AuthorizationContext.GetAuthorizationInfo(Request).DeviceId, request.PlaySessionId, s => true);
+ }
+
request.SessionId = GetSession().Result.Id;
var task = _sessionManager.OnPlaybackStopped(request);