add more dlna options

pull/702/head
Luke Pulverenti 11 years ago
parent 7438aa6dfa
commit f226d94012

@ -1,5 +1,4 @@
using MediaBrowser.Model.Dto;
using ServiceStack;
using ServiceStack;
namespace MediaBrowser.Api.Playback
{

@ -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; }
}

@ -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)

@ -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;

@ -4,11 +4,13 @@ namespace MediaBrowser.Model.Configuration
public 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;
}
}
}

Loading…
Cancel
Save