additional bug fixes

This commit is contained in:
bobokun 2021-12-14 08:03:46 -05:00
parent 6e996c6034
commit 5170da9c20
No known key found for this signature in database
GPG key ID: 9665BA6CF5DC2671
3 changed files with 7 additions and 3 deletions

View file

@ -110,7 +110,7 @@ class Config:
tags['url'] = util.trunc_val(urls[0], '/')
except IndexError as e:
tags['url'] = None
logger.debug(f"Tracker Url:{urls[0]}")
logger.debug(f"Tracker Url:{urls}")
logger.debug(e)
if 'tags' in self.data and self.data["tags"] is not None and urls:
tag_values = self.data['tags']

View file

@ -217,7 +217,7 @@ class Qbt:
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
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:
#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]:

View file

@ -247,7 +247,11 @@ def print_end():
# truncate the value of the torrent url to remove sensitive information
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
def move_files(src, dest, mod=False):