Skip to content

Commit

Permalink
fix:下载所有没有打开文件目录选项
Browse files Browse the repository at this point in the history
  • Loading branch information
GentleCP committed Mar 31, 2020
1 parent 3e5e1d5 commit eacc312
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions core/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
'''
Expand Down Expand Up @@ -273,6 +280,8 @@ def _download_course_by_season(self,season):

else:
self._logger.info("[同步完成] 本次无更新内容!")
exit(200)


def _show(self, infos):
if infos:
Expand Down

0 comments on commit eacc312

Please sign in to comment.