From 517f83ae61d1c6ba637ce7601624c46f2f08ed16 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Fri, 7 Jul 2023 07:07:13 +0800 Subject: [PATCH] fix downloading --- .gitignore | 3 ++- app/chain/download.py | 2 +- app/modules/qbittorrent/qbittorrent.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index cbe96b30..e9a16e1b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ *.c build/ test.py -app/helper/sites.py \ No newline at end of file +app/helper/sites.py +config/user.db \ No newline at end of file diff --git a/app/chain/download.py b/app/chain/download.py index 08021dec..6ec8c32a 100644 --- a/app/chain/download.py +++ b/app/chain/download.py @@ -102,7 +102,7 @@ class DownloadChain(ChainBase): if _hash: # 登记下载记录 self.downloadhis.add( - path=_folder_name, + path=_folder_name or _torrent.title, type=_media.type.value, title=_media.title, year=_media.year, diff --git a/app/modules/qbittorrent/qbittorrent.py b/app/modules/qbittorrent/qbittorrent.py index d269e08f..3fe3fba0 100644 --- a/app/modules/qbittorrent/qbittorrent.py +++ b/app/modules/qbittorrent/qbittorrent.py @@ -95,7 +95,7 @@ class Qbittorrent(metaclass=Singleton): if not self.qbc: return None torrents, error = self.get_torrents(ids=ids, - status=["downloading", 'paused'], + status=["downloading", 'paused', 'stalled_downloading'], tags=tags) return None if error else torrents or []