summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert McNamara <rmcnamara@mythtv.org>2011-04-14 00:47:44 (GMT)
committer Robert McNamara <rmcnamara@mythtv.org>2011-04-14 00:53:47 (GMT)
commitf6e282f4cd95de787448ee32281cc0c20caafc5d (patch)
tree4ea24f4ba4928746144eb8ae6c679ae2498299cf
parentc1c7af0900b357c2e2b811c6affd31fb8a0600ca (diff)
RSS Parsing: Check player tags to make sure they don't have child elements.
This works around some very odd RSS feeds produced by Blip.tv, which inline a bunch of of HTML instead of using attributes as the Media RSS specification specifies: Reference: http://video.search.yahoo.com/mrss "Allows the media object to be accessed through a web browser media player console. This element is required only if a direct media url attribute is not specified in the <media:content> element. It has 1 required attribute, and 2 optional attributes. \<media:player url=\"http://www.foo.com/player?id=1111\" height=\"200\" width="400" /\> url is the url of the player console that plays the media. It is a required attribute. height is the height of the browser window that the url should be opened in. It is an optional attribute. width is the width of the browser window that the url should be opened in. It is an optional attribute." So, basically, we work around the violation of the spec by checking for child elements. Fixes #9724.
-rw-r--r--mythtv/libs/libmyth/rssparse.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mythtv/libs/libmyth/rssparse.cpp b/mythtv/libs/libmyth/rssparse.cpp
index 6ca9582..3c553ce 100644
--- a/mythtv/libs/libmyth/rssparse.cpp
+++ b/mythtv/libs/libmyth/rssparse.cpp
@@ -821,7 +821,7 @@ ResultItem* Parse::ParseItem(const QDomElement& item) const
// Get the external player binary
QDomElement playertemp = item.firstChildElement("player");
- if (!playertemp.isNull())
+ if (!playertemp.isNull() && !playertemp.hasChildNodes())
player = playertemp.text();
// Get the arguments to pass to the external player