aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/ApiEntryPoint.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2015-05-26 16:06:31 -0400
committerLuke <luke.pulverenti@gmail.com>2015-05-26 16:06:31 -0400
commit8bd7055d1738f22e9f52cd80a79e7a4ac23d61ff (patch)
tree185830059da50b6c43f13ca528fe981c1266808f /MediaBrowser.Api/ApiEntryPoint.cs
parenta3d796cd54c809c7ec2783e5cab6c37b2950410d (diff)
parentb666c627c8def4d1236090372bd6795fec940979 (diff)
Merge pull request #1109 from MediaBrowser/dev
3.0.5621.3
Diffstat (limited to 'MediaBrowser.Api/ApiEntryPoint.cs')
-rw-r--r--MediaBrowser.Api/ApiEntryPoint.cs26
1 files changed, 16 insertions, 10 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index 2cd900754..05ff503e4 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -250,19 +250,19 @@ namespace MediaBrowser.Api
return GetTranscodingJob(path, type) != null;
}
- public TranscodingJob GetTranscodingJob(string path, TranscodingJobType type)
+ public TranscodingJob GetTranscodingJobByPlaySessionId(string playSessionId)
{
lock (_activeTranscodingJobs)
{
- return _activeTranscodingJobs.FirstOrDefault(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
+ return _activeTranscodingJobs.FirstOrDefault(j => j.PlaySessionId.Equals(playSessionId, StringComparison.OrdinalIgnoreCase));
}
}
- public TranscodingJob GetTranscodingJob(string id)
+ public TranscodingJob GetTranscodingJob(string path, TranscodingJobType type)
{
lock (_activeTranscodingJobs)
{
- return _activeTranscodingJobs.FirstOrDefault(j => j.Id.Equals(id, StringComparison.OrdinalIgnoreCase));
+ return _activeTranscodingJobs.FirstOrDefault(j => j.Type == type && j.Path.Equals(path, StringComparison.OrdinalIgnoreCase));
}
}
@@ -339,14 +339,17 @@ namespace MediaBrowser.Api
return;
}
- var timerDuration = job.Type == TranscodingJobType.Progressive ?
- 1000 :
- 1800000;
+ var timerDuration = 1000;
- // We can really reduce the timeout for apps that are using the newer api
- if (!string.IsNullOrWhiteSpace(job.PlaySessionId) && job.Type != TranscodingJobType.Progressive)
+ if (job.Type != TranscodingJobType.Progressive)
{
- timerDuration = 50000;
+ timerDuration = 1800000;
+
+ // We can really reduce the timeout for apps that are using the newer api
+ if (!string.IsNullOrWhiteSpace(job.PlaySessionId))
+ {
+ timerDuration = 60000;
+ }
}
job.PingTimeout = timerDuration;
@@ -628,6 +631,9 @@ namespace MediaBrowser.Api
/// </summary>
/// <value>The live stream identifier.</value>
public string LiveStreamId { get; set; }
+
+ public bool IsLiveOutput { get; set; }
+
/// <summary>
/// Gets or sets the path.
/// </summary>