mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-11-11 00:41:34 +08:00
additional checks for cleanup set to true
This commit is contained in:
parent
5e4435d251
commit
41fb6105c3
1 changed files with 11 additions and 10 deletions
|
|
@ -536,16 +536,17 @@ def tag_nohardlinks():
|
||||||
|
|
||||||
|
|
||||||
#loop through torrent list again for cleanup purposes
|
#loop through torrent list again for cleanup purposes
|
||||||
for torrent in torrent_list:
|
if ('cleanup' in nohardlinks['Movie'] and nohardlinks['Movie']['cleanup']):
|
||||||
if torrent.name in tdel_dict.keys() and 'noHL' in torrent.tags:
|
for torrent in torrent_list:
|
||||||
#Double check that the content path is the same before we delete anything
|
if torrent.name in tdel_dict.keys() and 'noHL' in torrent.tags:
|
||||||
if torrent['content_path'].replace(root_path,remote_path) == tdel_dict[torrent.name]:
|
#Double check that the content path is the same before we delete anything
|
||||||
t_del_cs += 1
|
if torrent['content_path'].replace(root_path,remote_path) == tdel_dict[torrent.name]:
|
||||||
if args.dry_run != 'dry_run':
|
t_del_cs += 1
|
||||||
if (os.path.exists(torrent['content_path'].replace(root_path,remote_path))):
|
if args.dry_run != 'dry_run':
|
||||||
torrent.delete(hash=torrent.hash, delete_files=True)
|
if (os.path.exists(torrent['content_path'].replace(root_path,remote_path))):
|
||||||
else:
|
torrent.delete(hash=torrent.hash, delete_files=True)
|
||||||
torrent.delete(hash=torrent.hash, delete_files=False)
|
else:
|
||||||
|
torrent.delete(hash=torrent.hash, delete_files=False)
|
||||||
|
|
||||||
|
|
||||||
#Checks to see if previous noHL tagged torrents now have hard links.
|
#Checks to see if previous noHL tagged torrents now have hard links.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue