def __init__(self, session): EcasaPictureWall.__init__(self, session) self.skinName = ["EcasaOverview", "EcasaPictureWall"] thread = SimpleThread(self.api.getFeatured) thread.deferred.addCallbacks(self.gotPictures, self.errorPictures) thread.start() self.onClose.append(self.__onClose)
def setupClosed(self): api = self.api EcasaPictureWall.setupClosed(self) if api != self.api: self.pictures = () self["highlight"].hide() for i in range(self.PICS_PER_PAGE): self['image%d' % i].instance.setPixmap(None) self["waitingtext"].show() thread = SimpleThread(self.api.getFeatured) thread.deferred.addCallbacks(self.gotPictures, self.errorPictures) thread.start()
def setupClosed(self): api = self.api EcasaPictureWall.setupClosed(self) if api != self.api: self.pictures = () self["highlight"].hide() for i in xrange(self.PICS_PER_PAGE): self['image%d' % i].instance.setPixmap(None) self["waitingtext"].show() thread = SimpleThread(self.api.getFeatured) thread.deferred.addCallbacks(self.gotPictures, self.errorPictures) thread.start()
def acquireAlbumsForUser(self, user): thread = SimpleThread(lambda: self.api.getAlbums(user=user)) thread.deferred.addCallbacks(self.gotAlbums, self.errorAlbums) thread.start()
def __onClose(self): thread = SimpleThread(lambda: self.api.cleanupCache( config.plugins.ecasa.cachesize.value)) thread.start()
def parseEPGAsync(self, simulateOnly = False): t = SimpleThread(lambda: self.parseEPG(simulateOnly=simulateOnly)) t.start() return t.deferred
def parseEPGAsync(self, simulateOnly=False): t = SimpleThread(lambda: self.parseEPG(simulateOnly=simulateOnly)) t.start() return t.deferred
def acquireAlbumsForUser(self, user): thread = SimpleThread(lambda:self.api.getAlbums(user=user)) thread.deferred.addCallbacks(self.gotAlbums, self.errorAlbums) thread.start()
def __onClose(self): thread = SimpleThread(lambda: self.api.cleanupCache(config.plugins.ecasa.cachesize.value)) thread.start()