self.series_title = series_title
self.series_id = series_id
- def get_children(self):
- if self.children:
- return self.children
- print "DOWNLOADING SERIES"
+ def fill_children(self):
series_doc = grab_json(PARAMS["api"] + "series=" + self.series_id, 3600)[0]
for episode in series_doc["f"]:
vpath = episode["n"]
if self.series_title != episode_title:
episode_title = self.series_title + " " + episode_title
IviewNode(episode_title, self, vpath)
- return self.children
index += doc["itemsPerPage"]
class SbsRoot(Node):
- def __init__(self, title, parent=None):
- Node.__init__(self, title, parent)
+ def __init__(self, parent=None):
+ Node.__init__(self, "SBS", parent)
self.catnodes = {}
def get_catnode(self, name):
self.catnodes[name] = n
return n
- def get_children(self):
- if self.children:
- return self.children
+ def fill_children(self):
for section in SECTIONS:
fill_section(self.get_catnode, section)
- return self.children
def fill_nodes(root_node):
- SbsRoot("SBS", root_node)
+ SbsRoot(root_node)