plugin.py 文件源码

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

项目:enigma2-plugins 作者: opendreambox 项目源码 文件源码
def loadPreviewpics(self):
        self.thumbnails = []
        self.mythumbubeentries = None
        self.index = 0
        self.maxentries = 0
        self.picloads = {}
        self.mythumbubeentries = [self.video.thumbnailUrl]
        self.maxentries = len(self.mythumbubeentries)-1
        if self.mythumbubeentries:
            currindex = 0
            for entry in self.mythumbubeentries:
                thumbID = self.video.id + str(currindex)
                thumbnailFile = "/tmp/" + thumbID + ".jpg"
                currPic = [currindex,thumbID,thumbnailFile,None]
                self.thumbnails.append(currPic)
                thumbnailUrl = None
                thumbnailUrl = entry
                if thumbnailUrl is not None:
                    client.downloadPage(thumbnailUrl,thumbnailFile).addCallback(self.fetchFinished,currindex,thumbID).addErrback(self.fetchFailed,currindex,thumbID)
                currindex +=1
        else:
            pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号