mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
move Didl builder
This commit is contained in:
parent
62bf617278
commit
6a435d62f5
@ -5,9 +5,9 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace MediaBrowser.Dlna.PlayTo
|
namespace MediaBrowser.Dlna.Didl
|
||||||
{
|
{
|
||||||
internal class DidlBuilder
|
public class DidlBuilder
|
||||||
{
|
{
|
||||||
const string CRLF = "\r\n";
|
const string CRLF = "\r\n";
|
||||||
const string UNKNOWN = "Unknown";
|
const string UNKNOWN = "Unknown";
|
@ -61,7 +61,7 @@
|
|||||||
<Compile Include="PlayTo\DeviceEventArgs.cs" />
|
<Compile Include="PlayTo\DeviceEventArgs.cs" />
|
||||||
<Compile Include="PlayTo\DeviceInfo.cs" />
|
<Compile Include="PlayTo\DeviceInfo.cs" />
|
||||||
<Compile Include="Common\DeviceService.cs" />
|
<Compile Include="Common\DeviceService.cs" />
|
||||||
<Compile Include="PlayTo\DidlBuilder.cs" />
|
<Compile Include="Didl\DidlBuilder.cs" />
|
||||||
<Compile Include="PlayTo\DlnaController.cs" />
|
<Compile Include="PlayTo\DlnaController.cs" />
|
||||||
<Compile Include="PlayTo\Extensions.cs" />
|
<Compile Include="PlayTo\Extensions.cs" />
|
||||||
<Compile Include="PlayTo\PlaylistItem.cs">
|
<Compile Include="PlayTo\PlaylistItem.cs">
|
||||||
|
@ -7,6 +7,7 @@ using MediaBrowser.Controller.Entities.Audio;
|
|||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Persistence;
|
using MediaBrowser.Controller.Persistence;
|
||||||
using MediaBrowser.Controller.Session;
|
using MediaBrowser.Controller.Session;
|
||||||
|
using MediaBrowser.Dlna.Didl;
|
||||||
using MediaBrowser.Model.Dlna;
|
using MediaBrowser.Model.Dlna;
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
|
@ -93,15 +93,6 @@ namespace MediaBrowser.Dlna.Server
|
|||||||
|
|
||||||
var deviceId = "fgd";
|
var deviceId = "fgd";
|
||||||
|
|
||||||
var env = new XmlDocument();
|
|
||||||
env.AppendChild(env.CreateXmlDeclaration("1.0", "utf-8", "yes"));
|
|
||||||
var envelope = env.CreateElement("SOAP-ENV", "Envelope", NS_SOAPENV);
|
|
||||||
env.AppendChild(envelope);
|
|
||||||
envelope.SetAttribute("encodingStyle", NS_SOAPENV, "http://schemas.xmlsoap.org/soap/encoding/");
|
|
||||||
|
|
||||||
var rbody = env.CreateElement("SOAP-ENV:Body", NS_SOAPENV);
|
|
||||||
env.DocumentElement.AppendChild(rbody);
|
|
||||||
|
|
||||||
IEnumerable<KeyValuePair<string, string>> result;
|
IEnumerable<KeyValuePair<string, string>> result;
|
||||||
|
|
||||||
_logger.Debug("Received control request {0}", method.Name);
|
_logger.Debug("Received control request {0}", method.Name);
|
||||||
@ -125,6 +116,15 @@ namespace MediaBrowser.Dlna.Server
|
|||||||
else
|
else
|
||||||
throw new ResourceNotFoundException("Unexpected control request name: " + method.LocalName);
|
throw new ResourceNotFoundException("Unexpected control request name: " + method.LocalName);
|
||||||
|
|
||||||
|
var env = new XmlDocument();
|
||||||
|
env.AppendChild(env.CreateXmlDeclaration("1.0", "utf-8", "yes"));
|
||||||
|
var envelope = env.CreateElement("SOAP-ENV", "Envelope", NS_SOAPENV);
|
||||||
|
env.AppendChild(envelope);
|
||||||
|
envelope.SetAttribute("encodingStyle", NS_SOAPENV, "http://schemas.xmlsoap.org/soap/encoding/");
|
||||||
|
|
||||||
|
var rbody = env.CreateElement("SOAP-ENV:Body", NS_SOAPENV);
|
||||||
|
env.DocumentElement.AppendChild(rbody);
|
||||||
|
|
||||||
var response = env.CreateElement(String.Format("u:{0}Response", method.LocalName), method.NamespaceURI);
|
var response = env.CreateElement(String.Format("u:{0}Response", method.LocalName), method.NamespaceURI);
|
||||||
rbody.AppendChild(response);
|
rbody.AppendChild(response);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user