@ -12,8 +12,8 @@ namespace MediaBrowser.Dlna.PlayTo
{
{
public class Device : IDisposable
public class Device : IDisposable
{
{
const string ServiceAvtransport Id = "urn:upnp-org:serviceId:AVTransport ";
const string ServiceAvtransport Type = "urn:schemas-upnp-org:service:AVTransport:1 ";
const string ServiceRendering Id = "urn:upnp-org:serviceId:RenderingControl ";
const string ServiceRendering Type = "urn:schemas-upnp-org:service:RenderingControl:1 ";
#region Fields & Properties
#region Fields & Properties
@ -213,7 +213,7 @@ namespace MediaBrowser.Dlna.PlayTo
if ( command = = null )
if ( command = = null )
return true ;
return true ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceRenderingId ) ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceRenderingType ) ;
if ( service = = null )
if ( service = = null )
{
{
@ -232,7 +232,7 @@ namespace MediaBrowser.Dlna.PlayTo
if ( command = = null )
if ( command = = null )
return value ;
return value ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceAvtransportId ) ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceAvtransportType ) ;
if ( service = = null )
if ( service = = null )
{
{
@ -262,7 +262,7 @@ namespace MediaBrowser.Dlna.PlayTo
{ "CurrentURIMetaData" , CreateDidlMeta ( metaData ) }
{ "CurrentURIMetaData" , CreateDidlMeta ( metaData ) }
} ;
} ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceAvtransportId ) ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceAvtransportType ) ;
if ( service = = null )
if ( service = = null )
{
{
@ -307,7 +307,7 @@ namespace MediaBrowser.Dlna.PlayTo
{ "NextURIMetaData" , CreateDidlMeta ( metaData ) }
{ "NextURIMetaData" , CreateDidlMeta ( metaData ) }
} ;
} ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceAvtransportId ) ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceAvtransportType ) ;
if ( service = = null )
if ( service = = null )
{
{
@ -328,7 +328,7 @@ namespace MediaBrowser.Dlna.PlayTo
if ( command = = null )
if ( command = = null )
return false ;
return false ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceAvtransportId ) ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceAvtransportType ) ;
if ( service = = null )
if ( service = = null )
{
{
@ -348,7 +348,7 @@ namespace MediaBrowser.Dlna.PlayTo
if ( command = = null )
if ( command = = null )
return false ;
return false ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceAvtransportId ) ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceAvtransportType ) ;
var result = await new SsdpHttpClient ( _httpClient , _config ) . SendCommandAsync ( Properties . BaseUrl , service , command . Name , RendererCommands . BuildPost ( command , service . ServiceType , 1 ) )
var result = await new SsdpHttpClient ( _httpClient , _config ) . SendCommandAsync ( Properties . BaseUrl , service , command . Name , RendererCommands . BuildPost ( command , service . ServiceType , 1 ) )
. ConfigureAwait ( false ) ;
. ConfigureAwait ( false ) ;
@ -362,7 +362,7 @@ namespace MediaBrowser.Dlna.PlayTo
if ( command = = null )
if ( command = = null )
return false ;
return false ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceAvtransportId ) ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceAvtransportType ) ;
var result = await new SsdpHttpClient ( _httpClient , _config ) . SendCommandAsync ( Properties . BaseUrl , service , command . Name , RendererCommands . BuildPost ( command , service . ServiceType , 1 ) )
var result = await new SsdpHttpClient ( _httpClient , _config ) . SendCommandAsync ( Properties . BaseUrl , service , command . Name , RendererCommands . BuildPost ( command , service . ServiceType , 1 ) )
. ConfigureAwait ( false ) ;
. ConfigureAwait ( false ) ;
@ -436,7 +436,7 @@ namespace MediaBrowser.Dlna.PlayTo
if ( command = = null )
if ( command = = null )
return ;
return ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceRenderingId ) ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceRenderingType ) ;
if ( service = = null )
if ( service = = null )
{
{
@ -470,7 +470,7 @@ namespace MediaBrowser.Dlna.PlayTo
if ( command = = null )
if ( command = = null )
return ;
return ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceAvtransportId ) ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceAvtransportType ) ;
if ( service = = null )
if ( service = = null )
return ;
return ;
@ -497,7 +497,7 @@ namespace MediaBrowser.Dlna.PlayTo
if ( command = = null )
if ( command = = null )
return ;
return ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceAvtransportId ) ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceAvtransportType ) ;
if ( service = = null )
if ( service = = null )
{
{
@ -538,7 +538,7 @@ namespace MediaBrowser.Dlna.PlayTo
if ( command = = null )
if ( command = = null )
return true ;
return true ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceAvtransportId ) ;
var service = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceAvtransportType ) ;
if ( service = = null )
if ( service = = null )
{
{
@ -596,7 +596,7 @@ namespace MediaBrowser.Dlna.PlayTo
private async Task GetAVProtocolAsync ( )
private async Task GetAVProtocolAsync ( )
{
{
var avService = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceAvtransportId ) ;
var avService = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceAvtransportType ) ;
if ( avService = = null )
if ( avService = = null )
return ;
return ;
@ -614,7 +614,7 @@ namespace MediaBrowser.Dlna.PlayTo
private async Task GetRenderingProtocolAsync ( )
private async Task GetRenderingProtocolAsync ( )
{
{
var avService = Properties . Services . FirstOrDefault ( s = > s . Service Id = = ServiceRenderingId ) ;
var avService = Properties . Services . FirstOrDefault ( s = > s . Service Type = = ServiceRenderingType ) ;
if ( avService = = null )
if ( avService = = null )
return ;
return ;
@ -711,7 +711,7 @@ namespace MediaBrowser.Dlna.PlayTo
if ( service ! = null )
if ( service ! = null )
{
{
deviceProperties . Services . Add ( service ) ;
deviceProperties . Services . Add ( service ) ;
if ( service . Service Id = = ServiceAvtransportId )
if ( service . Service Type = = ServiceAvtransportType )
{
{
isRenderer = true ;
isRenderer = true ;
}
}