mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
* Add analyzers to MediaBrowser.XbmcMetadata * Enable TreatWarningsAsErrors for MediaBrowser.XbmcMetadata * Add analyzers to MediaBrowser.WebDashboard * Enable TreatWarningsAsErrors for MediaBrowser.WebDashboard * Disable SA1600 in favor of CS1591
42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
#pragma warning disable CS1591
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Xml;
|
|
using Emby.Dlna.Service;
|
|
using MediaBrowser.Common.Extensions;
|
|
using MediaBrowser.Controller.Configuration;
|
|
using MediaBrowser.Model.Dlna;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace Emby.Dlna.ConnectionManager
|
|
{
|
|
public class ControlHandler : BaseControlHandler
|
|
{
|
|
private readonly DeviceProfile _profile;
|
|
|
|
public ControlHandler(IServerConfigurationManager config, ILogger logger, DeviceProfile profile)
|
|
: base(config, logger)
|
|
{
|
|
_profile = profile;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void WriteResult(string methodName, IDictionary<string, string> methodParams, XmlWriter xmlWriter)
|
|
{
|
|
if (string.Equals(methodName, "GetProtocolInfo", StringComparison.OrdinalIgnoreCase))
|
|
{
|
|
HandleGetProtocolInfo(xmlWriter);
|
|
return;
|
|
}
|
|
|
|
throw new ResourceNotFoundException("Unexpected control request name: " + methodName);
|
|
}
|
|
|
|
private void HandleGetProtocolInfo(XmlWriter xmlWriter)
|
|
{
|
|
xmlWriter.WriteElementString("Source", _profile.ProtocolInfo);
|
|
xmlWriter.WriteElementString("Sink", string.Empty);
|
|
}
|
|
}
|
|
}
|