From 57590323b2c4de33ee39dd75d85c9d2ff1004438 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 17 Nov 2024 14:56:42 +0800 Subject: [PATCH] fix ext --- app/chain/download.py | 2 +- app/helper/torrent.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/chain/download.py b/app/chain/download.py index df9aa49c..cfef34c0 100644 --- a/app/chain/download.py +++ b/app/chain/download.py @@ -332,7 +332,7 @@ class DownloadChain(ChainBase): continue # 只处理视频格式 if not Path(file).suffix \ - or Path(file).suffix not in settings.RMT_MEDIAEXT: + or Path(file).suffix.lower() not in settings.RMT_MEDIAEXT: continue files_to_add.append({ "download_hash": _hash, diff --git a/app/helper/torrent.py b/app/helper/torrent.py index fcbc806f..313471d7 100644 --- a/app/helper/torrent.py +++ b/app/helper/torrent.py @@ -287,7 +287,7 @@ class TorrentHelper(metaclass=Singleton): if not file: continue file_path = Path(file) - if file_path.suffix not in settings.RMT_MEDIAEXT: + if not file_path.suffix or file_path.suffix.lower() not in settings.RMT_MEDIAEXT: continue # 只使用文件名识别 meta = MetaInfo(file_path.stem)