aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/PlaystateService.cs
diff options
context:
space:
mode:
authorT. Adams <t.adams88@gmail.com>2015-04-03 11:04:25 -0700
committerT. Adams <t.adams88@gmail.com>2015-04-03 11:04:25 -0700
commitabf12569ba2aa31ea3a00e4faf3adad2f740cbd9 (patch)
tree47c57c6361825491d38e3def6b716926ddd9aa59 /MediaBrowser.Api/UserLibrary/PlaystateService.cs
parent46c92107490263f8e6abefbd2259780013fa195d (diff)
parentef505c8e9e2b8f348aeaa89be6bc446014b72996 (diff)
Merging in latest dev
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);