@@ -150,10 +150,10 @@ def rename_subtitles(
150
150
if not renamed :
151
151
logger .warning (f"[Renamer] { subtitle_path } rename failed" )
152
152
153
- def check_multi_version (self ):
153
+ def check_multi_version (self , tag = None ):
154
154
if not settings .bangumi_manage .retain_latest_media_version :
155
155
return
156
- torrents_info = self .get_torrent_info ()
156
+ torrents_info = self .get_torrent_info (tag = tag )
157
157
grouped_torrents = defaultdict (list )
158
158
159
159
for torrent_info in torrents_info :
@@ -197,12 +197,15 @@ def check_multi_version(self):
197
197
)
198
198
self .delete_torrent (torrent_hashes .keys ())
199
199
200
- def rename (self ) -> list [Notification ]:
200
+ def rename (self , tag = "" ) -> list [Notification ]:
201
201
# Get torrent info
202
202
logger .debug ("[Renamer] Start rename process." )
203
- self .check_multi_version ()
203
+ if tag :
204
+ self .check_multi_version (tag = tag )
205
+ else :
206
+ self .check_multi_version ()
204
207
rename_method = settings .bangumi_manage .rename_method
205
- torrents_info = self .get_torrent_info ()
208
+ torrents_info = self .get_torrent_info (tag = tag )
206
209
renamed_info : list [Notification ] = []
207
210
for info in torrents_info :
208
211
media_list , subtitle_list = self .check_files (info )
0 commit comments