Skip to content

Commit 5bf79b7

Browse files
added first play to classes
1 parent 6cbe5de commit 5bf79b7

29 files changed

+1826
-27
lines changed

MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using MediaBrowser.Common.Configuration;
1+
using System.Collections.Specialized;
2+
using MediaBrowser.Common.Configuration;
23
using MediaBrowser.Common.IO;
34
using MediaBrowser.Common.Net;
45
using MediaBrowser.Model.Logging;
@@ -367,7 +368,7 @@ private HttpResponseInfo GetResponseInfo(HttpWebResponse httpResponse, Stream co
367368

368369
ContentType = httpResponse.ContentType,
369370

370-
Headers = httpResponse.Headers,
371+
Headers = new NameValueCollection(httpResponse.Headers),
371372

372373
ContentLength = contentLength
373374
};

MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ public virtual string ResolveShortcut(string filename)
5555

5656
if (string.Equals(Path.GetExtension(filename), ".mblink", StringComparison.OrdinalIgnoreCase))
5757
{
58-
return File.ReadAllText(filename);
58+
var path = File.ReadAllText(filename);
59+
60+
return NormalizePath(path);
5961
}
6062

6163
return null;

MediaBrowser.Dlna/MediaBrowser.Dlna.csproj

+29
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,37 @@
5151
<Compile Include="..\SharedVersion.cs">
5252
<Link>Properties\SharedVersion.cs</Link>
5353
</Compile>
54+
<Compile Include="PlayTo\Argument.cs" />
55+
<Compile Include="PlayTo\CurrentIdEventArgs.cs" />
56+
<Compile Include="PlayTo\DeviceProperties.cs" />
57+
<Compile Include="PlayTo\Extensions.cs" />
58+
<Compile Include="PlayTo\PlaylistItem.cs">
59+
<SubType>Code</SubType>
60+
</Compile>
61+
<Compile Include="PlayTo\ServiceAction.cs" />
62+
<Compile Include="PlayTo\SsdpHelper.cs" />
63+
<Compile Include="PlayTo\SsdpHttpClient.cs" />
64+
<Compile Include="PlayTo\StateVariable.cs" />
65+
<Compile Include="PlayTo\TransportCommands.cs" />
66+
<Compile Include="PlayTo\TransportStateEventArgs.cs" />
67+
<Compile Include="PlayTo\uBaseObject.cs" />
68+
<Compile Include="PlayTo\uContainer.cs" />
69+
<Compile Include="PlayTo\uIcon.cs" />
70+
<Compile Include="PlayTo\uParser.cs" />
71+
<Compile Include="PlayTo\uPnpNamespaces.cs" />
72+
<Compile Include="PlayTo\uService.cs" />
5473
<Compile Include="Properties\AssemblyInfo.cs" />
5574
</ItemGroup>
75+
<ItemGroup>
76+
<ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">
77+
<Project>{9142eefa-7570-41e1-bfcc-468bb571af2f}</Project>
78+
<Name>MediaBrowser.Common</Name>
79+
</ProjectReference>
80+
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj">
81+
<Project>{7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b}</Project>
82+
<Name>MediaBrowser.Model</Name>
83+
</ProjectReference>
84+
</ItemGroup>
5685
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
5786
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
5887
Other similar extension points exist, see Microsoft.Common.targets.

MediaBrowser.Dlna/PlayTo/Argument.cs

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using System;
2+
using System.Xml.Linq;
3+
4+
namespace MediaBrowser.Dlna.PlayTo
5+
{
6+
public class Argument
7+
{
8+
public string Name { get; set; }
9+
10+
public string Direction { get; set; }
11+
12+
public string RelatedStateVariable { get; set; }
13+
14+
public static Argument FromXml(XElement container)
15+
{
16+
if (container == null)
17+
{
18+
throw new ArgumentNullException("container");
19+
}
20+
21+
return new Argument
22+
{
23+
Name = container.GetValue(uPnpNamespaces.svc + "name"),
24+
Direction = container.GetValue(uPnpNamespaces.svc + "direction"),
25+
RelatedStateVariable = container.GetValue(uPnpNamespaces.svc + "relatedStateVariable")
26+
};
27+
}
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
3+
namespace MediaBrowser.Dlna.PlayTo
4+
{
5+
public class CurrentIdEventArgs : EventArgs
6+
{
7+
public Guid Id { get; set; }
8+
9+
public CurrentIdEventArgs(string id)
10+
{
11+
if (string.IsNullOrWhiteSpace(id) || id == "0")
12+
{
13+
Id = Guid.Empty;
14+
}
15+
else
16+
{
17+
Id = new Guid(id);
18+
}
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)