mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-11-07 23:16:04 +08:00
additional bug fixes
This commit is contained in:
parent
6e996c6034
commit
5170da9c20
3 changed files with 7 additions and 3 deletions
|
|
@ -110,7 +110,7 @@ class Config:
|
||||||
tags['url'] = util.trunc_val(urls[0], '/')
|
tags['url'] = util.trunc_val(urls[0], '/')
|
||||||
except IndexError as e:
|
except IndexError as e:
|
||||||
tags['url'] = None
|
tags['url'] = None
|
||||||
logger.debug(f"Tracker Url:{urls[0]}")
|
logger.debug(f"Tracker Url:{urls}")
|
||||||
logger.debug(e)
|
logger.debug(e)
|
||||||
if 'tags' in self.data and self.data["tags"] is not None and urls:
|
if 'tags' in self.data and self.data["tags"] is not None and urls:
|
||||||
tag_values = self.data['tags']
|
tag_values = self.data['tags']
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ class Qbt:
|
||||||
self.set_tags_and_limits(torrent, tags["max_ratio"], tags["max_seeding_time"],tags["limit_upload_speed"])
|
self.set_tags_and_limits(torrent, tags["max_ratio"], tags["max_seeding_time"],tags["limit_upload_speed"])
|
||||||
#loop through torrent list again for cleanup purposes
|
#loop through torrent list again for cleanup purposes
|
||||||
if (nohardlinks[category]['cleanup']):
|
if (nohardlinks[category]['cleanup']):
|
||||||
for torrent in alive_it(torrent_list):
|
for torrent in torrent_list:
|
||||||
if torrent.name in tdel_dict.keys() and 'noHL' in torrent.tags:
|
if torrent.name in tdel_dict.keys() and 'noHL' in torrent.tags:
|
||||||
#Double check that the content path is the same before we delete anything
|
#Double check that the content path is the same before we delete anything
|
||||||
if torrent['content_path'].replace(root_dir,root_dir) == tdel_dict[torrent.name]:
|
if torrent['content_path'].replace(root_dir,root_dir) == tdel_dict[torrent.name]:
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,11 @@ def print_end():
|
||||||
|
|
||||||
# truncate the value of the torrent url to remove sensitive information
|
# truncate the value of the torrent url to remove sensitive information
|
||||||
def trunc_val(s, d, n=3):
|
def trunc_val(s, d, n=3):
|
||||||
return d.join(s.split(d, n)[:n])
|
try:
|
||||||
|
x = d.join(s.split(d, n)[:n])
|
||||||
|
except IndexError as e:
|
||||||
|
x = None
|
||||||
|
return x
|
||||||
|
|
||||||
# Move files from source to destination, mod variable is to change the date modified of the file being moved
|
# Move files from source to destination, mod variable is to change the date modified of the file being moved
|
||||||
def move_files(src, dest, mod=False):
|
def move_files(src, dest, mod=False):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue