From eacc312391e1818648b9341cc749729306d7bc4f Mon Sep 17 00:00:00 2001 From: GentleCP <574881148@qq.com> Date: Tue, 31 Mar 2020 19:56:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=B8=8B=E8=BD=BD=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=89=93=E5=BC=80=E6=96=87=E4=BB=B6=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++++-- core/source.py | 9 +++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4917cde..194eb58 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,12 @@ # 2. 版本号 -1.5.0 +1.5.1 -## 2.1 更新内容 +## 2.1 更新内容 +- [1.5.1] + > 修复下载全部课程资源时没有打开文件目录的选项问题,当无更新的时候自动退出应用 + - [1.5.0] - 课程资源同步后有新的资源时会提示是否开启资源所在目录,简便查看文件操作,如下 ![](img/1.5.0-1.png) diff --git a/core/source.py b/core/source.py index 91797fa..08808ec 100644 --- a/core/source.py +++ b/core/source.py @@ -236,8 +236,15 @@ def _download_all(self): self._logger.info("[同步完成] 本次更新资源列表如下:") for source in self._update_sources: print('\033[1;41m'+source+'\033[0m') + + is_open = input("是否打开资源所在目录(默认n)?(y/n)") + if is_open: + self.__open_dir() + exit(200) + else: self._logger.info("[同步完成] 本次无更新内容!") + exit(200) def __open_dir(self): ''' @@ -273,6 +280,8 @@ def _download_course_by_season(self,season): else: self._logger.info("[同步完成] 本次无更新内容!") + exit(200) + def _show(self, infos): if infos: