Browse files

RSS Parsing: Check player tags to make sure they don't have child ele…


This works around some very odd RSS feeds produced by, which inline a bunch of of HTML instead of using attributes as the Media RSS specification specifies:


"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=\"\" 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.
  • Loading branch information...
1 parent 418772b commit d77e4347c42504be92ac0d3aad178881cfb13326 Robert McNamara committed Apr 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 mythtv/libs/libmyth/rssparse.cpp
@@ -820,7 +820,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

0 comments on commit d77e434

Please sign in to comment.