The Free Software Media System - Server Backend & API
update live stream handling
Luke Pulverenti10b9a865b7ba
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.csindex 9f4ad58937..444977e352 100644--- a/MediaBrowser.Api/ApiEntryPoint.cs+++ b/MediaBrowser.Api/ApiEntryPoint.cs@@ -132,7 +132,7 @@ namespace MediaBrowser.Api/// Called when [transcode beginning]./// </summary>/// <param name="path">The path.</param>- /// <param name="streamId">The stream identifier.</param>+ /// <param name="playSessionId">The play session identifier.</param>/// <param name="transcodingJobId">The transcoding job identifier.</param>/// <param name="type">The type.</param>/// <param name="process">The process.</param>@@ -141,7 +141,7 @@ namespace MediaBrowser.Api/// <param name="cancellationTokenSource">The cancellation token source.</param>/// <returns>TranscodingJob.</returns>public TranscodingJob OnTranscodeBeginning(string path,- string streamId,+ string playSessionId,string transcodingJobId,TranscodingJobType type,Process process,@@ -160,7 +160,7 @@ namespace MediaBrowser.ApiDeviceId = deviceId,CancellationTokenSource = cancellationTokenSource,Id = transcodingJobId,- StreamId = streamId+ PlaySessionId = playSessionId};_activeTranscodingJobs.Add(job);@@ -324,10 +324,10 @@ namespace MediaBrowser.Api/// Kills the single transcoding job./// </summary>/// <param name="deviceId">The device id.</param>- /// <param name="streamId">The stream identifier.</param>+ /// <param name="playSessionId">The play session identifier.</param>/// <param name="deleteFiles">The delete files.</param>/// <returns>Task.</returns>- internal void KillTranscodingJobs(string deviceId, string streamId, Func<string, bool> deleteFiles)+ internal void KillTranscodingJobs(string deviceId, string playSessionId, Func<string, bool> deleteFiles){if (string.IsNullOrEmpty(deviceId)){@@ -338,7 +338,7 @@ namespace MediaBrowser.Api{if (string.Equals(deviceId, j.DeviceId, StringComparison.OrdinalIgnoreCase)){- return string.IsNullOrWhiteSpace(streamId) || string.Equals(streamId, j.StreamId, StringComparison.OrdinalIgnoreCase);+ return string.IsNullOrWhiteSpace(playSessionId) || string.Equals(playSessionId, j.PlaySessionId, StringComparison.OrdinalIgnoreCase);}return false;@@ -539,10 +539,10 @@ namespace MediaBrowser.Apipublic class TranscodingJob{/// <summary>- /// Gets or sets the stream identifier.+ /// Gets or sets the play session identifier./// </summary>- /// <value>The stream identifier.</value>- public string StreamId { get; set; }+ /// <value>The play session identifier.</value>+ public string PlaySessionId { get; set; }/// <summary>/// Gets or sets the path./// </summary>diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.csindex 34c5e5f7c8..c4cdfc9edd 100644--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs@@ -126,7 +126,7 @@ namespace MediaBrowser.Api.Playbackvar data = GetCommandLineArguments("dummy\\dummy", state, false);data += "-" + (state.Request.DeviceId ?? string.Empty);- data += "-" + (state.Request.StreamId ?? string.Empty);+ data += "-" + (state.Request.PlaySessionId ?? string.Empty);data += "-" + (state.Request.ClientTime ?? string.Empty);var dataHash = data.GetMD5().ToString("N");@@ -1009,7 +1009,7 @@ namespace MediaBrowser.Api.Playback}var transcodingJob = ApiEntryPoint.Instance.OnTranscodeBeginning(outputPath,- state.Request.StreamId,+ state.Request.PlaySessionId,transcodingId,TranscodingJobType,process,@@ -1511,7 +1511,7 @@ namespace MediaBrowser.Api.Playback}else if (i == 21){- request.StreamId = val;+ request.PlaySessionId = val;}else if (i == 22){diff --git a/MediaBrowser.Api/Playback/Dash/MpegDashService.cs b/MediaBrowser.Api/Playback/Dash/MpegDashService.csindex 692e8d4e74..ba3f172579 100644--- a/MediaBrowser.Api/Playback/Dash/MpegDashService.cs+++ b/MediaBrowser.Api/Playback/Dash/MpegDashService.cs@@ -160,7 +160,7 @@ namespace MediaBrowser.Api.Playback.Dash// If the playlist doesn't already exist, startup ffmpegtry{- ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, request.StreamId, p => false);+ ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, request.PlaySessionId, p => false);if (currentTranscodingIndex.HasValue){diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.csindex 4f7c0444b2..4f043d3217 100644--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs@@ -135,7 +135,7 @@ namespace MediaBrowser.Api.Playback.Hls// If the playlist doesn't already exist, startup ffmpegtry{- ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, request.StreamId, p => false);+ ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, request.PlaySessionId, p => false);if (currentTranscodingIndex.HasValue){diff --git a/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs b/MediaBrowser.Api/Playback/Hls/HlsSegmentService.csindex 1fe0661d9f..5d8c67abe9 100644--- a/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs+++ b/MediaBrowser.Api/Playback/Hls/HlsSegmentService.cs@@ -54,8 +54,8 @@ namespace MediaBrowser.Api.Playback.Hls[ApiMember(Name = "DeviceId", Description = "The device id of the client requesting. Used to stop encoding processes when needed.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "DELETE")]public string DeviceId { get; set; }- [ApiMember(Name = "StreamId", Description = "The stream id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "DELETE")]- public string StreamId { get; set; }+ [ApiMember(Name = "PlaySessionId", Description = "The play session id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "DELETE")]+ public string PlaySessionId { get; set; }}/// <summary>@@ -95,7 +95,7 @@ namespace MediaBrowser.Api.Playback.Hlspublic void Delete(StopEncodingProcess request){- ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, request.StreamId, path => true);+ ApiEntryPoint.Instance.KillTranscodingJobs(request.DeviceId, request.PlaySessionId, path => true);}/// <summary>diff --git a/MediaBrowser.Api/Playback/MediaInfoService.cs b/MediaBrowser.Api/Playback/MediaInfoService.csindex 6f8c2cc505..c6678d1ed1 100644--- a/MediaBrowser.Api/Playback/MediaInfoService.cs+++ b/MediaBrowser.Api/Playback/MediaInfoService.cs@@ -194,7 +194,7 @@ namespace MediaBrowser.Api.Playback}else{- result.StreamId = Guid.NewGuid().ToString("N");+ result.PlaySessionId = Guid.NewGuid().ToString("N");}return result;diff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.csindex 7ed4fcd965..75242e604c 100644--- a/MediaBrowser.Api/Playback/StreamRequest.cs+++ b/MediaBrowser.Api/Playback/StreamRequest.cs@@ -71,7 +71,7 @@ namespace MediaBrowser.Api.Playbackpublic string Params { get; set; }public string ClientTime { get; set; }- public string StreamId { get; set; }+ public string PlaySessionId { get; set; }public string LiveStreamId { get; set; }}diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.csindex dc24627960..12319a1227 100644--- a/MediaBrowser.Model/Dlna/StreamInfo.cs+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs@@ -206,8 +206,8 @@ namespace MediaBrowser.Model.Dlnalist.Add(new NameValuePair("Profile", item.VideoProfile ?? string.Empty));list.Add(new NameValuePair("Cabac", item.Cabac.HasValue ? item.Cabac.Value.ToString() : string.Empty));- string streamId = item.PlaybackInfo == null ? null : item.PlaybackInfo.StreamId;- list.Add(new NameValuePair("StreamId", streamId ?? string.Empty));+ string playSessionId = item.PlaybackInfo == null ? null : item.PlaybackInfo.PlaySessionId;+ list.Add(new NameValuePair("PlaySessionId", playSessionId ?? string.Empty));list.Add(new NameValuePair("api_key", accessToken ?? string.Empty));string liveStreamId = item.MediaSource == null ? null : item.MediaSource.LiveStreamId;diff --git a/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs b/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.csindex ed0824e8a4..1f8936d018 100644--- a/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs+++ b/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs@@ -13,10 +13,10 @@ namespace MediaBrowser.Model.MediaInfopublic List<MediaSourceInfo> MediaSources { get; set; }/// <summary>- /// Gets or sets the stream identifier.+ /// Gets or sets the play session identifier./// </summary>- /// <value>The stream identifier.</value>- public string StreamId { get; set; }+ /// <value>The play session identifier.</value>+ public string PlaySessionId { get; set; }/// <summary>/// Gets or sets the error code.diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspecindex ee3bdd2b6b..57a1db722d 100644--- a/Nuget/MediaBrowser.Common.Internal.nuspec+++ b/Nuget/MediaBrowser.Common.Internal.nuspec@@ -2,7 +2,7 @@<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"><metadata><id>MediaBrowser.Common.Internal</id>- <version>3.0.606</version>+ <version>3.0.607</version><title>MediaBrowser.Common.Internal</title><authors>Luke</authors><owners>ebr,Luke,scottisafool</owners>@@ -12,7 +12,7 @@<description>Contains common components shared by Emby Theater and Emby Server. Not intended for plugin developer consumption.</description><copyright>Copyright © Emby 2013</copyright><dependencies>- <dependency id="MediaBrowser.Common" version="3.0.606" />+ <dependency id="MediaBrowser.Common" version="3.0.607" /><dependency id="NLog" version="3.2.0.0" /><dependency id="SimpleInjector" version="2.7.0" /></dependencies>diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspecindex a8f3ea1f38..9ad9c18ca2 100644--- a/Nuget/MediaBrowser.Common.nuspec+++ b/Nuget/MediaBrowser.Common.nuspec@@ -2,7 +2,7 @@<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"><metadata><id>MediaBrowser.Common</id>- <version>3.0.606</version>+ <version>3.0.607</version><title>MediaBrowser.Common</title><authors>Emby Team</authors><owners>ebr,Luke,scottisafool</owners>diff --git a/Nuget/MediaBrowser.Model.Signed.nuspec b/Nuget/MediaBrowser.Model.Signed.nuspecindex 7bd4a090dd..261ddd37d1 100644--- a/Nuget/MediaBrowser.Model.Signed.nuspec+++ b/Nuget/MediaBrowser.Model.Signed.nuspec@@ -2,7 +2,7 @@<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"><metadata><id>MediaBrowser.Model.Signed</id>- <version>3.0.606</version>+ <version>3.0.607</version><title>MediaBrowser.Model - Signed Edition</title><authors>Emby Team</authors><owners>ebr,Luke,scottisafool</owners>diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspecindex 3f39ace9dd..49a38aaeb3 100644--- a/Nuget/MediaBrowser.Server.Core.nuspec+++ b/Nuget/MediaBrowser.Server.Core.nuspec@@ -2,7 +2,7 @@<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"><metadata><id>MediaBrowser.Server.Core</id>- <version>3.0.606</version>+ <version>3.0.607</version><title>Media Browser.Server.Core</title><authors>Emby Team</authors><owners>ebr,Luke,scottisafool</owners>@@ -12,7 +12,7 @@<description>Contains core components required to build plugins for Emby Server.</description><copyright>Copyright © Emby 2013</copyright><dependencies>- <dependency id="MediaBrowser.Common" version="3.0.606" />+ <dependency id="MediaBrowser.Common" version="3.0.607" /></dependencies></metadata><files>