Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复当不使用专用的下载器而经常报错的问题 #22

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bangumi/bangumi.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def check_complete(self):
return

# 过滤标记为做种的已完成项目
completed = [item for item in completed if not redisDB.is_seeding(item.hash)]
# there might be torrents that are already in the downloader but not added by us
completed = [item for item in completed if redisDB.get(item.hash) and not redisDB.is_seeding(item.hash)]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我没记错的话, 一个文件完成之后会从 redis 把它的相关信息删除掉,
这里 redisDB.get(hash) 一定没内容

Copy link
Contributor Author

@xyqyear xyqyear Apr 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果这个种子不是由本程序添加的而是由用户直接向下载器添加的话,就会导致下面的rename操作失败。redis里面应该没有用户手动添加的种子的信息吧。

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哦哦,懂你意思了, 我想一下。


if len(completed) == 0:
return
Expand Down