mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-14 02:20:53 +08:00
2.5.22
- 修复 normal 方法不生效的问题
This commit is contained in:
@@ -86,4 +86,5 @@ class Renamer:
|
||||
if __name__ == "__main__":
|
||||
from conf.const_dev import DEV_SETTINGS
|
||||
settings.init(DEV_SETTINGS)
|
||||
rename = Renamer(DownloadClient())
|
||||
rename = Renamer(DownloadClient())
|
||||
rename.run()
|
||||
@@ -37,7 +37,7 @@ class DownloadParser:
|
||||
|
||||
def rename_normal(self, info: DownloadInfo):
|
||||
for rule in self.rules:
|
||||
match_obj = re.match(rule, name, re.I)
|
||||
match_obj = re.match(rule, info.file_name, re.I)
|
||||
if match_obj is not None:
|
||||
title = re.sub(r"([Ss]|Season )\d{1,3}", "", match_obj.group(1)).strip()
|
||||
new_name = f"{title} S{info.season}E{match_obj.group(2)}{match_obj.group(3)}"
|
||||
|
||||
Reference in New Issue
Block a user