fix: fix torrents info bugs.

This commit is contained in:
EstrellaXD
2023-08-12 18:18:01 +08:00
parent ec97edfe8d
commit 03a4077182
3 changed files with 2 additions and 4 deletions

View File

@@ -19,8 +19,6 @@ class RSSThread(ProgramStatus):
self.analyser = RSSAnalyser()
def rss_loop(self):
with DownloadClient() as client:
client.init_downloader()
while not self.stop_event.is_set():
with DownloadClient() as client, RSSEngine() as engine:
# Analyse RSS

View File

@@ -130,7 +130,7 @@ class DownloadClient(TorrentPath):
logger.debug(f"[Downloader] Add torrent: {bangumi.official_title}")
return True
else:
logger.error(f"[Downloader] Add torrent failed: {bangumi.official_title}")
logger.debug(f"[Downloader] Torrent added before: {bangumi.official_title}")
return False
def move_torrent(self, hashes, location):

View File

@@ -86,6 +86,6 @@ class RSSEngine(Database):
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 all torrents to database
self.torrent.add_all(new_torrents)