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: