Fix RequestContent(), fix renamer.py

This commit is contained in:
EstrellaXD
2023-03-14 23:11:45 +08:00
parent 34216245f7
commit cc65c07886
14 changed files with 31 additions and 35 deletions

View File

@@ -66,18 +66,3 @@ class FullSeasonGet:
logger.info("Completed!")
if __name__ == "__main__":
a = FullSeasonGet()
data = {
"official_title": "指名!",
"title_raw": "CUE!",
"season": 1,
"season_raw": "",
"group": "喵萌Production",
"dpi": "1080p",
"source": None,
"subtitle": "简日双语",
"added": True,
"eps_collect": True
}
print(a.init_eps_complete_search_str(data))

View File

@@ -65,8 +65,9 @@ class Renamer:
try:
new_name = self._renamer.download_parser(name, folder_name, season, suffix, settings.bangumi_manage.rename_method)
if path_name != new_name:
old_name = os.path.basename(info.content_path)
self.client.rename_torrent_file(torrent_hash, new_name, old_name, new_name)
old_path = info.content_path.replace(info.save_path, "")
old_path = old_path[len(os.path.sep):]
self.client.rename_torrent_file(torrent_hash, new_name, old_path, new_name)
rename_count += 1
else:
continue