plugin.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:enigma2-plugins 作者: opendreambox 项目源码 文件源码
def downloadThumbnails(self):
        self.timer_startDownload.stop()
        for entry in self.screenshotList:
            thumbnailUrl = entry[1]
            tubeid = entry[0]
            thumbnailFile = "/tmp/"+str(tubeid)+".jpg"
            if self.Details.has_key(tubeid):
                if self.Details[tubeid]["thumbnail"] is None:
                    if thumbnailUrl is not None:
                        if tubeid not in self.pixmaps_to_load:
                            self.pixmaps_to_load.append(tubeid)
                            if (os_path.exists(thumbnailFile) == True):
                                self.fetchFinished(False,tubeid)
                            else:
                                client.downloadPage(thumbnailUrl,thumbnailFile).addCallback(self.fetchFinished,str(tubeid)).addErrback(self.fetchFailed,str(tubeid))
                    else:
                        if tubeid not in self.pixmaps_to_load:
                            self.pixmaps_to_load.append(tubeid)
                            self.fetchFinished(False,tubeid, failed = True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号