[vlc-commits] upnp: Support Twonkymedia's DLNA server subtitles
Alexandre Pereira Nunes
git at videolan.org
Fri May 30 10:29:20 CEST 2014
vlc | branch: master | Alexandre Pereira Nunes <alexandre.nunes at gmail.com> | Fri May 30 10:28:53 2014 +0200| [22dee200e1ff34cd1686f4018419ff18ba942db9] | committer: Mirsal Ennaime
upnp: Support Twonkymedia's DLNA server subtitles
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=22dee200e1ff34cd1686f4018419ff18ba942db9
---
modules/services_discovery/upnp.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index 5cecff2..483f374 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -822,7 +822,8 @@ bool MediaServer::_fetchContents( Container* p_parent, int i_offset )
IXML_Document* p_response = _browseAction( p_parent->getObjectID(),
"BrowseDirectChildren",
"id,dc:title,res," /* Filter */
- "sec:CaptionInfo,sec:CaptionInfoEx",
+ "sec:CaptionInfo,sec:CaptionInfoEx,"
+ "pv:subtitlefile",
psz_starting_index, /* StartingIndex */
"0", /* RequestedCount */
"" /* SortCriteria */
@@ -912,6 +913,10 @@ bool MediaServer::_fetchContents( Container* p_parent, int i_offset )
psz_subtitles = xml_getChildElementValue( itemElement,
"sec:CaptionInfoEx" );
+ if ( !psz_subtitles )
+ psz_subtitles = xml_getChildElementValue( itemElement,
+ "pv:subtitlefile" );
+
/* Try to extract all resources in DIDL */
IXML_NodeList* p_resource_list = ixmlDocument_getElementsByTagName( (IXML_Document*) itemElement, "res" );
if ( p_resource_list )
More information about the vlc-commits
mailing list