From 1734d8a37869cdba5d93cab6df1cb177a92700c4 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Thu, 4 May 2023 12:18:22 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20renamer=20=E4=B8=8D=E8=83=BD=E9=87=8D?= =?UTF-8?q?=E5=91=BD=E5=90=8D1000=E9=9B=86=E4=BB=A5=E4=B8=8A=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/module/downloader/qb_downloader.py | 2 +- src/module/parser/analyser/torrent_parser.py | 11 +++++++++-- src/test/test_raw_parser.py | 9 +++++++++ src/test/test_torrent_parser.py | 16 +++++++++++++++- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/module/downloader/qb_downloader.py b/src/module/downloader/qb_downloader.py index 9074c916..ecb12693 100644 --- a/src/module/downloader/qb_downloader.py +++ b/src/module/downloader/qb_downloader.py @@ -58,7 +58,7 @@ class QbDownloader: def torrents_delete(self, hash): return self._client.torrents_delete( - delete_files=False, + delete_files=True, torrent_hashes=hash ) diff --git a/src/module/parser/analyser/torrent_parser.py b/src/module/parser/analyser/torrent_parser.py index 096bd0f1..a54dc7e7 100644 --- a/src/module/parser/analyser/torrent_parser.py +++ b/src/module/parser/analyser/torrent_parser.py @@ -16,10 +16,10 @@ class DownloadInfo: RULES = [ r"(.*) - (\d{1,4}|\d{1,4}\.\d{1,2})(?:v\d{1,2})?(?: )?(?:END)?(.*)", - r"(.*)[\[ E](\d{1,3}|\d{1,3}\.\d{1,2})(?:v\d{1,2})?(?: )?(?:END)?[\] ](.*)", + r"(.*)[\[\ E](\d{1,4}|\d{1,4}\.\d{1,2})(?:v\d{1,2})?(?: )?(?:END)?[\]\ ](.*)", r"(.*)\[(?:第)?(\d*\.*\d*)[话集話](?:END)?\](.*)", r"(.*)第(\d*\.*\d*)[话話集](?:END)?(.*)", - r"(.*)EP?(\d{1,4})(.*)", + r"(.*)(?