[WebUI] Fix tracker icon download error

Encoutering an error when webui attempts to download tracker icon:

    Error occurred downloading file from "http://b'acg.rip'/": invalid
    hostname: b'acg.rip'

Fixed by ensuring the request.tracker_name is decoded from bytes before
looking up the icon name.
This commit is contained in:
EFS 2021-01-18 00:18:39 +01:00 committed by Calum Lind
parent 8ec5ca9d08
commit a4da8d29f8

View File

@ -191,7 +191,7 @@ class Tracker(resource.Resource):
request.finish()
def render(self, request):
d = self.tracker_icons.fetch(request.tracker_name)
d = self.tracker_icons.fetch(request.tracker_name.decode())
d.addCallback(self.on_got_icon, request)
return server.NOT_DONE_YET