Skip to content

Commit

Permalink
Updated the channel node parser. It will look for a visible tag in th…
Browse files Browse the repository at this point in the history
…e channel node, and stream child node. This data will be used when calling the Channel method. It's optional, but is required for my add-on extension for hd homerun devices.
  • Loading branch information
djgonzo81 committed Mar 17, 2013
1 parent 4c47018 commit 86c39e1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion source.py
Expand Up @@ -873,7 +873,16 @@ def parseXMLTV(context, f, size, logoFolder, progress_callback):
iconElement = elem.find("icon")
if iconElement is not None:
logo = iconElement.get("src")
result = Channel(id, title, logo)
streamElement = elem.find("stream")
streamUrl = None
if streamElement is not None:
streamUrl = streamElement.get("url")
visible = elem.get("visible")
if visible == "0":
visible = False
else:
visible = True
result = Channel(id, title, logo, streamUrl, visible)

if result:
elements_parsed += 1
Expand Down

0 comments on commit 86c39e1

Please sign in to comment.