mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-12-01 00:38:13 +08:00
This commit is contained in:
@@ -80,11 +80,11 @@ class DownloadClient:
|
||||
status_filter="completed", category="Bangumi"
|
||||
)
|
||||
|
||||
def rename_torrent_file(self, hash, path_name, new_name):
|
||||
def rename_torrent_file(self, hash, new_file_name, old_path, new_path):
|
||||
self.client.torrents_rename_file(
|
||||
torrent_hash=hash, old_path=path_name, new_path=new_name
|
||||
torrent_hash=hash, new_file_name=new_file_name, old_path=old_path, new_path=new_path
|
||||
)
|
||||
logger.info(f"{path_name} >> {new_name}")
|
||||
logger.info(f"{old_path} >> {new_path}, new name {new_file_name}")
|
||||
|
||||
def delete_torrent(self, hashes):
|
||||
self.client.torrents_delete(
|
||||
|
||||
@@ -65,7 +65,8 @@ class Renamer:
|
||||
try:
|
||||
new_name = self._renamer.download_parser(name, folder_name, season, suffix, settings.bangumi_manage.rename_method)
|
||||
if path_name != new_name:
|
||||
self.client.rename_torrent_file(torrent_hash, path_name, new_name)
|
||||
old_name = info.content_path.replace(info.save_path, "")
|
||||
self.client.rename_torrent_file(torrent_hash, new_name, old_name, new_name)
|
||||
rename_count += 1
|
||||
else:
|
||||
continue
|
||||
|
||||
@@ -56,8 +56,9 @@ class QbDownloader:
|
||||
torrent_hashes=hash
|
||||
)
|
||||
|
||||
def torrents_rename_file(self, torrent_hash, old_path, new_path):
|
||||
self._client.torrents_rename_file(torrent_hash=torrent_hash, old_path=old_path, new_path=new_path)
|
||||
def torrents_rename_file(self, torrent_hash, new_file_name, old_path, new_path):
|
||||
self._client.torrents_rename_file(torrent_hash=torrent_hash, new_file_name=new_file_name,
|
||||
old_path=old_path, new_path=new_path)
|
||||
|
||||
def get_rss_info(self):
|
||||
item = self._client.rss_items().get("Mikan_RSS")
|
||||
|
||||
Reference in New Issue
Block a user