updated unit tests and fixed a bug
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
6
qlist.py
6
qlist.py
@@ -12,7 +12,7 @@ def build_tor_list(self):
|
||||
# Need a way to tag when the tracker is blank
|
||||
if is_tracker_blank(torrent['tracker']):
|
||||
if self.use_log:
|
||||
self.tl.warning(f'Torrent doesn\'t have a tracker ["{torrent["name"][0:20]}..."] [{torrent["tracker"]}]hash: {torrent["hash"]}')
|
||||
self.tl.warning(f'Torrent doesn\'t have a tracker ["{torrent["name"][0:20]}..."] hash: {torrent["hash"]}')
|
||||
self.ignored_counter += 1
|
||||
continue
|
||||
elif is_cat_ignored(torrent['category'], self.cat_whitelist.values()):
|
||||
@@ -32,7 +32,7 @@ def build_tor_list(self):
|
||||
self.qbt_client.torrents_add_tags(self.tracker_protected_tag,torrent['hash'])
|
||||
elif is_not_protected_tracker(torrent['tracker'], self.tracker_whitelist.values()):
|
||||
self.qbt_client.torrents_add_tags(self.tracker_non_protected_tag,torrent['hash'])
|
||||
if is_preme(torrent['seeding_time'], self.minimum_age):
|
||||
if is_preme(torrent['seeding_time'], self.min_age):
|
||||
self.preme_tor_counter += 1
|
||||
self.tl.debug(f'Premature torrent: ["{torrent["name"][0:20]}..."] Seconds Seeded: [{torrent["seeding_time"]}] hash: {torrent["hash"]}')
|
||||
continue
|
||||
@@ -51,7 +51,7 @@ def build_tor_list(self):
|
||||
|
||||
|
||||
def is_preme(seeding_time, minage):
|
||||
if seeding_time >= minage:
|
||||
if seeding_time <= minage:
|
||||
return True
|
||||
|
||||
def is_cat_ignored(cat, catlist):
|
||||
|
||||
Reference in New Issue
Block a user