Add config for valid tracker

This commit is contained in:
sqozz 2018-04-01 01:35:01 +02:00
parent 46ad8bddad
commit befc9db877
2 changed files with 8 additions and 2 deletions

View File

@ -111,7 +111,7 @@ def details():
return render_template("details.html", categories=categories.categories, torrent=tf)
def scrapeAll():
TRACKER_URL = "http://tracker.lootbox.cf:6969/"
TRACKER_URL = ""
statedump = requests.get(TRACKER_URL + "stats" + "?mode=statedump")
return
@ -156,7 +156,8 @@ def createNewTorrent(reuqest):
is_ours = False
for a in announce:
if a in [b'udp://tracker.lootbox.cf:6969/announce', b'udp://tracker.lootbox.cf:6969/announce/',b'udp://tracker.lootbox.cf/announce',b'udp://tracker.lootbox.cf/announce/']:
a = a.decode("utf-8", "ignore")
if a in settings["valid_tracker"]:
is_ours = True
break

View File

@ -184,6 +184,11 @@
}
]
}
],
"valid_tracker" : [
"udp://tracker.lootbox.cf:6969/announce",
"udp://tracker.lootbox.cf:6969/announce/"
]
}