def showImages(self): ''' ''' printl("", self, "S") dwl_poster = False dwl_backdrop = False if fileExists(getPictureData(self.selection, self.poster_postfix)): self.showRealPoster() else: dwl_poster = True if fileExists(getPictureData(self.selection, self.backdrop_postfix)): self.showRealBackdrop() else: dwl_backdrop = True if dwl_poster == True: self.downloadPoster() printl("", self, "C") return if dwl_backdrop == True: self.downloadBackdrop() printl("", self, "C") return
def checkR3(self, listViewList, currentIndex): if fileExists(getPictureData(listViewList[currentIndex + 3], self.image_prefix, self.poster_postfix)): #self.setText("postertext", "rendering ...") self.showR3() else: #self.setText("postertext", "downloading ...") self.downloadR3(listViewList[currentIndex + 3]) pass
def checkP0(self, listViewList, currentIndex): if fileExists(getPictureData(self.selection, self.image_prefix, self.poster_postfix)): #self.setText("postertext", "rendering ...") self.showP0() else: #self.setText("postertext", "downloading ...") self.downloadP0(self.selection) pass
def downloadBackdrop(self): ''' ''' printl("", self, "S") download_url = getTranscodeUrl("ArtBackdrop", self.selection, str(450), str(260)) #download_url = self.getBackdropUrl() printl( "download url " + download_url, self, "D") downloadPage(download_url, getPictureData(self.selection, self.backdrop_postfix)).addCallback(lambda _: self.downloadCallback()) printl("", self, "C")
def downloadPoster(self): ''' ''' printl("", self, "S") download_url = getTranscodeUrl("ArtPoster", self.selection, str(182), str(268)) #download_url = self.getPosterUrl() printl( "download url " + download_url, self, "D") downloadPage(str(download_url), getPictureData(self.selection, self.poster_postfix)).addCallback(lambda _: self.downloadCallback()) printl("", self, "C")
def downloadBackdrop(self): ''' ''' printl("", self, "S") download_url = getTranscodeUrl("ArtBackdrop", self.selection, str(450), str(260)) #download_url = self.getBackdropUrl() printl("download url " + download_url, self, "D") downloadPage(download_url, getPictureData(self.selection, self.backdrop_postfix)).addCallback( lambda _: self.downloadCallback()) printl("", self, "C")
def downloadPoster(self): ''' ''' printl("", self, "S") download_url = getTranscodeUrl("ArtPoster", self.selection, str(182), str(268)) #download_url = self.getPosterUrl() printl("download url " + download_url, self, "D") downloadPage(str(download_url), getPictureData(self.selection, self.poster_postfix)).addCallback( lambda _: self.downloadCallback()) printl("", self, "C")
def downloadBackdrop(self): ''' ''' printl("", self, "S") download_url = self.extraData["fanart_image"] printl( "download url " + download_url, self, "D") if download_url == "" or download_url == "/usr/lib/enigma2/python/Plugins/Extensions/DreamPlex/resources/plex.png": printl("no pic data available", self, "D") else: printl("starting download", self, "D") downloadPage(download_url, getPictureData(self.details, self.image_prefix, self.backdrop_postfix)).addCallback(lambda _: self.showBackdrop()) printl("", self, "C")
def download_P5(self, selection, currentIndex): ''' ''' printl("", self, "S") download_url = self.selection[1]["ArtPoster"] printl( "download url " + download_url, self, "D") if download_url == "" or download_url == "/usr/lib/enigma2/python/Plugins/Extensions/DreamPlex/resources/plex.png": printl("no pic data available", self, "D") self.setText("postertext", "not existing ...") else: printl("starting download", self, "D") downloadPage(str(download_url), getPictureData(self.selection, self.image_prefix, self.poster_postfix)).addCallback(lambda _: self.show_P5(currentIndex)) printl("", self, "C")
def downloadBackdrop(self): ''' ''' printl("", self, "S") download_url = self.selection[1]["ArtBackdrop"] printl( "download url " + download_url, self, "D") if download_url == "" or download_url == "/usr/lib/enigma2/python/Plugins/Extensions/DreamPlex/resources/plex.png": printl("no pic data available", self, "D") self.setText("backdroptext", "not existing ...") else: printl("starting download", self, "D") downloadPage(download_url, getPictureData(self.selection, self.image_prefix, self.backdrop_postfix)).addCallback(lambda _: self.showBackdrop()) printl("", self, "C")
def showPoster(self): ''' ''' printl("", self, "S") dwl_poster = False if fileExists(getPictureData(self.selection, self.image_prefix, self.poster_postfix)): self.setText("postertext", "rendering ...") if self.whatPoster is not None: self.EXpicloadPoster.startDecode(self.whatPoster) else: self.setText("postertext", "downloading ...") self.downloadPoster() printl("", self, "C") return
def downloadBackdrop(self): ''' ''' printl("", self, "S") download_url = self.extraData["fanart_image"] download_url = download_url.replace('&width=560&height=315', '&width=1280&height=720') #http://192.168.45.190:32400/photo/:/transcode?url=http%3A%2F%2Flocalhost%3A32400%2Flibrary%2Fmetadata%2F6209%2Fart%2F1354571799&width=560&height=315' printl( "download url " + download_url, self, "D") if download_url == "" or download_url == "/usr/lib/enigma2/python/Plugins/Extensions/DreamPlex/resources/plex.png": printl("no pic data available", self, "D") else: printl("starting download", self, "D") downloadPage(download_url, getPictureData(self.details, self.image_prefix, self.backdrop_postfix)).addCallback(lambda _: self.showBackdrop()) printl("", self, "C")
def showBackdrop(self): ''' ''' printl("", self, "S") dwl_backdrop = False if fileExists(getPictureData(self.selection, self.image_prefix, self.backdrop_postfix)): self.setText("backdroptext", "rendering ...") if self.whatBackdrop is not None: self.EXpicloadBackdrop.startDecode(self.whatBackdrop) else: self.setText("backdroptext", "downloading ...") self.downloadBackdrop() printl("", self, "C") return
def showImages(self, selection): ''' ''' printl("", self, "S") dwl_poster3__ = False dwl_poster2__ = False dwl_poster1__ = False dwl_poster_0_ = False dwl_poster__1 = False dwl_poster__2 = False dwl_poster__3 = False if fileExists(getPictureData(self.selection, self.poster_postfix)): self.showRealPoster() else: dwl_poster_0_ = True self.setPoster("poster_0_", selection[1]["ArtPosterId"]) currentIndex = self["listview"].getIndex() listViewList = self["listview"].list count = len(listViewList) for i in range(1, 4): # 1, 2, 3 if currentIndex >= i: self.setPoster( "poster" + str(i) + "__", listViewList[currentIndex - i][1]["ArtPosterId"]) else: self["poster" + str(i) + "__"].hide() if currentIndex + i < count: self.setPoster( "poster__" + str(i), listViewList[currentIndex + i][1]["ArtPosterId"]) else: self["poster__" + str(i)].hide() printl("", self, "C")
def showPoster(self): ''' ''' printl("", self, "S") dwl_poster = False if fileExists(getPictureData(self.details, self.image_prefix, self.poster_postfix)): if self.whatPoster is not None: self.EXpicloadPoster.startDecode(self.whatPoster,0,0,False) ptr = self.EXpicloadPoster.getData() if ptr is not None: self["poster"].instance.setPixmap(ptr) else: self.downloadPoster() printl("", self, "C") return
def showBackdrop(self): ''' ''' printl("", self, "S") dwl_backdrop = False if self.disableBackdrops == False: if fileExists(getPictureData(self.details, self.image_prefix, self.backdrop_postfix)): if self.whatBackdrop is not None: self.EXpicloadBackdrop.startDecode(self.whatBackdrop,0,0,False) ptr = self.EXpicloadBackdrop.getData() if ptr is not None: self["mybackdrop"].instance.setPixmap(ptr) else: self.downloadBackdrop() printl("", self, "C") return
def showImages(self, selection): ''' ''' printl("", self, "S") dwl_poster3__ = False dwl_poster2__ = False dwl_poster1__ = False dwl_poster_0_ = False dwl_poster__1 = False dwl_poster__2 = False dwl_poster__3 = False if fileExists(getPictureData(self.selection, self.poster_postfix)): self.showRealPoster() else: dwl_poster_0_ = True self.setPoster("poster_0_", selection[1]["ArtPosterId"]) currentIndex = self["listview"].getIndex() listViewList = self["listview"].list count = len(listViewList) for i in range(1,4): # 1, 2, 3 if currentIndex >= i: self.setPoster("poster" + str(i) + "__", listViewList[currentIndex - i][1]["ArtPosterId"]) else: self["poster" + str(i) + "__"].hide() if currentIndex + i < count: self.setPoster("poster__" + str(i), listViewList[currentIndex + i][1]["ArtPosterId"]) else: self["poster__" + str(i)].hide() printl("", self, "C")