diff options
Diffstat (limited to 'MediaBrowser.Dlna/ConnectionManager/ControlHandler.cs')
| -rw-r--r-- | MediaBrowser.Dlna/ConnectionManager/ControlHandler.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/MediaBrowser.Dlna/ConnectionManager/ControlHandler.cs b/MediaBrowser.Dlna/ConnectionManager/ControlHandler.cs index 842e9380a..d41b4a5bf 100644 --- a/MediaBrowser.Dlna/ConnectionManager/ControlHandler.cs +++ b/MediaBrowser.Dlna/ConnectionManager/ControlHandler.cs @@ -4,6 +4,7 @@ using MediaBrowser.Dlna.Server; using MediaBrowser.Dlna.Service; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Logging; +using System; using System.Collections.Generic; using System.Globalization; @@ -22,9 +23,21 @@ namespace MediaBrowser.Dlna.ConnectionManager protected override IEnumerable<KeyValuePair<string, string>> GetResult(string methodName, Headers methodParams) { - var deviceId = "test"; + if (string.Equals(methodName, "GetProtocolInfo", StringComparison.OrdinalIgnoreCase)) + { + return HandleGetProtocolInfo(); + } throw new ResourceNotFoundException("Unexpected control request name: " + methodName); } + + private IEnumerable<KeyValuePair<string, string>> HandleGetProtocolInfo() + { + return new Headers(true) + { + { "Source", _profile.ProtocolInfo }, + { "Sink", "" } + }; + } } } |
