Skip to content

Commit

Permalink
tweak findJustAdded
Browse files Browse the repository at this point in the history
  • Loading branch information
ccf-2012 committed Aug 17, 2022
1 parent 2d66812 commit 452bbe4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crseed/torclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,14 @@ def abbrevTracker(self, trackerstr):
return abbrev

def mkSeedTor(self, tor):
ltr = 3 if len(tor.trackers) >= 3 else (len(tor.trackers) -1)
if len(tor.trackers) < 3:
ltr = 3 if len(tor.trackers) >= 4 else (len(tor.trackers) -1)
if len(tor.trackers) < 4:
print("The Trackers", tor.trackers)
trackerstr = tor.tracker if len(tor.tracker)>1 else tor.trackers[ltr]["url"]
if ltr > 0:
trackerstr = tor.tracker if len(tor.tracker)>1 else tor.trackers[ltr]["url"]
else:
print("No tracker string")
trackerstr = 'unknow'
st = SeedingTorrent(
torrent_hash=tor.hash,
name=tor.name,
Expand Down

0 comments on commit 452bbe4

Please sign in to comment.