mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-10-04 02:46:52 +08:00
bug fix unregistered torrents
Bug fix for unregistered torrents with multiple trackers associated
This commit is contained in:
parent
2fd3c57dda
commit
15d22a81b8
1 changed files with 7 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
import logging, os
|
import logging, os
|
||||||
from qbittorrentapi import Client, LoginFailed, APIConnectionError
|
from qbittorrentapi import Client, LoginFailed, APIConnectionError, NotFound404Error
|
||||||
from modules import util
|
from modules import util
|
||||||
from modules.util import Failed, print_line, print_multiline, separator
|
from modules.util import Failed, print_line, print_multiline, separator
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
@ -700,10 +700,12 @@ class Qbt:
|
||||||
def tor_delete_recycle(self, torrent):
|
def tor_delete_recycle(self, torrent):
|
||||||
if self.config.recyclebin['enabled']:
|
if self.config.recyclebin['enabled']:
|
||||||
tor_files = []
|
tor_files = []
|
||||||
# Define torrent files/folders
|
try:
|
||||||
for file in torrent.files:
|
# Define torrent files/folders
|
||||||
tor_files.append(os.path.join(torrent.save_path, file.name))
|
for file in torrent.files:
|
||||||
|
tor_files.append(os.path.join(torrent.save_path, file.name))
|
||||||
|
except NotFound404Error:
|
||||||
|
return
|
||||||
# Create recycle bin if not exists
|
# Create recycle bin if not exists
|
||||||
recycle_path = os.path.join(self.config.remote_dir, '.RecycleBin')
|
recycle_path = os.path.join(self.config.remote_dir, '.RecycleBin')
|
||||||
os.makedirs(recycle_path, exist_ok=True)
|
os.makedirs(recycle_path, exist_ok=True)
|
||||||
|
|
Loading…
Add table
Reference in a new issue