fix subscribe_hash

This commit is contained in:
Victor Shyba 2022-03-07 23:57:53 -03:00
parent 888e9918a6
commit 43e50f7f04

View file

@ -164,4 +164,5 @@ class TrackerClient:
def subscribe_hash(hash, on_data):
TrackerClient.EVENT_CONTROLLER.add(('search', bytes.fromhex(hash)))
TrackerClient.EVENT_CONTROLLER.stream.listen(lambda request: on_data(request[1]) if request[0] == hash else None)
TrackerClient.EVENT_CONTROLLER.stream.listen(
lambda request: on_data(request[1]) if request[0].hex() == hash else None)