gui.py 文件源码

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

项目:download-npo 作者: Carpetsmoker 项目源码 文件源码
def append_download_to_queue(self, url):
        video = None
        # for v in self._videos:
        #    if v['status'] not in [3, 5] and v['url'] == url:
        #        # TODO: Update opts
        #        video = v

        # if video is None:
        if True:
            video = {
                'url': url,
                'filename': self.filename.get(),
                'outdir': self.outdir.get(),
                'subtitles': self.subtitles.get(),
                'overwrite': self.overwrite.get(),
                'quality': self.quality.get(),

                # 0: not yet started
                # 1: in progress
                # 2: finished
                # 3: error
                # 4: paused
                # 5: cancelled
                'status': 0,
            }
            self._videos.append(video)
        video['row'] = len(self._videos)
        self.queue.put(lambda: thread.start_new_thread(self.fetch_meta, (video,)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号