[vlc-commits] upnp: Use information returned by the server
Hugo Beauzée-Luyssen
git at videolan.org
Thu Jan 28 14:19:11 CET 2016
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Jan 28 13:09:55 2016 +0100| [28ca1b850c8541b827512667bcb8ab8342e6edfe] | committer: Hugo Beauzée-Luyssen
upnp: Use information returned by the server
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=28ca1b850c8541b827512667bcb8ab8342e6edfe
---
modules/services_discovery/upnp.cpp | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index 94ebfcf..f7bfb4f 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -953,6 +953,30 @@ input_item_t* MediaServer::getNextItem()
p_item = newItem( title, objectID, i_duration,
psz_resource_url );
+ if ( p_item != NULL )
+ {
+ const char* psz_artist = xml_getChildElementValue( itemElement, "upnp:artist" );
+ if ( psz_artist != NULL )
+ input_item_SetArtist( p_item, psz_artist );
+ const char* psz_genre = xml_getChildElementValue( itemElement, "upnp:genre" );
+ if ( psz_genre != NULL )
+ input_item_SetGenre( p_item, psz_genre );
+ const char* psz_album = xml_getChildElementValue( itemElement, "upnp:album" );
+ if ( psz_album != NULL )
+ input_item_SetAlbum( p_item, psz_album );
+ const char* psz_date = xml_getChildElementValue( itemElement, "dc:date" );
+ if ( psz_date != NULL )
+ input_item_SetDate( p_item, psz_date );
+ const char* psz_orig_track_nb = xml_getChildElementValue( itemElement, "upnp:originalTrackNumber" );
+ if ( psz_orig_track_nb != NULL )
+ input_item_SetTrackNumber( p_item, psz_orig_track_nb );
+ const char* psz_album_artist = xml_getChildElementValue( itemElement, "upnp:albumArtist" );
+ if ( psz_album_artist != NULL )
+ input_item_SetAlbumArtist( p_item, psz_album_artist );
+ const char* psz_albumArt = xml_getChildElementValue( itemElement, "upnp:albumArtURI" );
+ if ( psz_albumArt != NULL )
+ input_item_SetArtworkURL( p_item, psz_albumArt );
+ }
}
ixmlNodeList_free( p_resource_list );
}
More information about the vlc-commits
mailing list