The Free Software Media System - Server Backend & API
add more dlna options
Luke Pulverentif226d94012cb
diff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.csindex 67948e19ab..3439621e95 100644--- a/MediaBrowser.Api/Playback/StreamRequest.cs+++ b/MediaBrowser.Api/Playback/StreamRequest.cs@@ -1,5 +1,4 @@-using MediaBrowser.Model.Dto;-using ServiceStack;+using ServiceStack;namespace MediaBrowser.Api.Playback{diff --git a/MediaBrowser.Api/SessionsService.cs b/MediaBrowser.Api/SessionsService.csindex 070fe9e598..a509c876ce 100644--- a/MediaBrowser.Api/SessionsService.cs+++ b/MediaBrowser.Api/SessionsService.cs@@ -27,7 +27,7 @@ namespace MediaBrowser.Api[ApiMember(Name = "ControllableByUserId", Description = "Optional. Filter by sessions that a given user is allowed to remote control.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]public Guid? ControllableByUserId { get; set; }- [ApiMember(Name = "DeviceId", Description = "Optional. Filter by device id.", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")]+ [ApiMember(Name = "DeviceId", Description = "Optional. Filter by device id.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]public string DeviceId { get; set; }}diff --git a/MediaBrowser.Dlna/PlayTo/PlayToManager.cs b/MediaBrowser.Dlna/PlayTo/PlayToManager.csindex d7460c352e..f3901e0b40 100644--- a/MediaBrowser.Dlna/PlayTo/PlayToManager.cs+++ b/MediaBrowser.Dlna/PlayTo/PlayToManager.cs@@ -176,7 +176,9 @@ namespace MediaBrowser.Dlna.PlayTo{socket.SendTo(request, new IPEndPoint(IPAddress.Parse("239.255.255.250"), 1900));- await Task.Delay(10000).ConfigureAwait(false);+ var delay = _config.Configuration.DlnaOptions.ClientDiscoveryIntervalSeconds*1000;++ await Task.Delay(delay).ConfigureAwait(false);}}catch (OperationCanceledException)diff --git a/MediaBrowser.Dlna/PlayTo/SsdpHttpClient.cs b/MediaBrowser.Dlna/PlayTo/SsdpHttpClient.csindex 7a4928e5ca..f540a80041 100644--- a/MediaBrowser.Dlna/PlayTo/SsdpHttpClient.cs+++ b/MediaBrowser.Dlna/PlayTo/SsdpHttpClient.cs@@ -49,7 +49,7 @@ namespace MediaBrowser.Dlna.PlayTo{Url = url.ToString(),UserAgent = USERAGENT,- LogRequest = _config.Configuration.DlnaOptions.EnablePlayToDebugLogging+ LogRequest = _config.Configuration.DlnaOptions.EnableDebugLogging};options.RequestHeaders["HOST"] = ip + ":" + port;@@ -88,7 +88,7 @@ namespace MediaBrowser.Dlna.PlayTo{Url = url.ToString(),UserAgent = USERAGENT,- LogRequest = _config.Configuration.DlnaOptions.EnablePlayToDebugLogging+ LogRequest = _config.Configuration.DlnaOptions.EnableDebugLogging};options.RequestHeaders["FriendlyName.DLNA.ORG"] = FriendlyName;@@ -112,7 +112,7 @@ namespace MediaBrowser.Dlna.PlayTo{Url = url.ToString(),UserAgent = USERAGENT,- LogRequest = _config.Configuration.DlnaOptions.EnablePlayToDebugLogging+ LogRequest = _config.Configuration.DlnaOptions.EnableDebugLogging};options.RequestHeaders["SOAPAction"] = soapAction;diff --git a/MediaBrowser.Model/Configuration/DlnaOptions.cs b/MediaBrowser.Model/Configuration/DlnaOptions.csindex b2503ebc7e..893e377faf 100644--- a/MediaBrowser.Model/Configuration/DlnaOptions.cs+++ b/MediaBrowser.Model/Configuration/DlnaOptions.cs@@ -4,11 +4,13 @@ namespace MediaBrowser.Model.Configurationpublic class DlnaOptions{public bool EnablePlayTo { get; set; }- public bool EnablePlayToDebugLogging { get; set; }+ public bool EnableDebugLogging { get; set; }+ public int ClientDiscoveryIntervalSeconds { get; set; }public DlnaOptions(){EnablePlayTo = true;+ ClientDiscoveryIntervalSeconds = 30;}}}