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

fix: 失败的种子不会再次下载,也没有手动重试操作,每次要删数据库,挺麻烦的。 #818

Open
wants to merge 2 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
6 changes: 4 additions & 2 deletions backend/src/module/rss/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,16 @@ def refresh_rss(self, client: DownloadClient, rss_id: Optional[int] = None):
for rss_item in rss_items:
new_torrents = self.pull_rss(rss_item)
# Get all enabled bangumi data
add_torrents = []
for torrent in new_torrents:
matched_data = self.match_torrent(torrent)
if matched_data:
if client.add_torrent(torrent, matched_data):
logger.debug(f"[Engine] Add torrent {torrent.name} to client")
torrent.downloaded = True
torrent.downloaded = True
add_torrents.append(torrent)
# Add all torrents to database
self.torrent.add_all(new_torrents)
self.torrent.add_all(add_torrents)

def download_bangumi(self, bangumi: Bangumi):
with RequestContent() as req:
Expand Down