comparison iview.py @ 1:f914f08d69f5

Don't re-get series info if we already have it as it's very slow.
author Daniel O'Connor <darius@dons.net.au>
date Thu, 20 Aug 2009 17:33:35 +0930
parents fa7ca67af8c9
children f2e0787f52b8
comparison
equal deleted inserted replaced
0:fa7ca67af8c9 1:f914f08d69f5
74 self.name = descape(chanElem.getElementsByTagName("name")[0].childNodes[0].data) 74 self.name = descape(chanElem.getElementsByTagName("name")[0].childNodes[0].data)
75 self.descr = descape(chanElem.getElementsByTagName("description")[0].childNodes[0].data) 75 self.descr = descape(chanElem.getElementsByTagName("description")[0].childNodes[0].data)
76 self.series = [] 76 self.series = []
77 77
78 def getSeries(self): 78 def getSeries(self):
79 if len(self.series) > 0:
80 return
79 # This can take ages 81 # This can take ages
80 print "Fetching series for channel " + self.name 82 print "Fetching series for channel " + self.name
81 # Series is nested for some reason 83 # Series is nested for some reason
82 xmlp = minidom.parse(urllib2.urlopen(self.path)) 84 xmlp = minidom.parse(urllib2.urlopen(self.path))
83 nl = xmlp.getElementsByTagName("series")[0] 85 nl = xmlp.getElementsByTagName("series")[0]