torrent_gui.py 文件源码

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

项目:bit-torrent 作者: borzunov 项目源码 文件源码
def submit_torrent(self):
        self._torrent_info.download_dir = self._download_dir
        self._control.last_download_dir = os.path.abspath(self._download_dir)

        file_paths = []
        for node, item in self._file_items:
            if item.checkState(0) == Qt.Checked:
                file_paths.append(node.path)
        if not self._torrent_info.download_info.single_file_mode:
            self._torrent_info.download_info.select_files(file_paths, 'whitelist')

        self._control_thread.loop.call_soon_threadsafe(self._control.add, self._torrent_info)

        self.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号