mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Fix tracker_icons not handling relative redirects
This commit is contained in:
parent
d6c8b13041
commit
53a9c217e7
1 changed files with 2 additions and 2 deletions
|
@ -235,7 +235,7 @@ class TrackerIcons(Component):
|
||||||
d = f
|
d = f
|
||||||
if f.check(error.PageRedirect):
|
if f.check(error.PageRedirect):
|
||||||
# Handle redirect errors
|
# Handle redirect errors
|
||||||
location = error_msg.split(" to ")[1]
|
location = urljoin(host_to_url(host), error_msg.split(" to ")[1])
|
||||||
d = self.download_page(host, url=location)
|
d = self.download_page(host, url=location)
|
||||||
d.addCallbacks(self.on_download_page_complete, self.on_download_page_fail,
|
d.addCallbacks(self.on_download_page_complete, self.on_download_page_fail,
|
||||||
errbackArgs=(host,))
|
errbackArgs=(host,))
|
||||||
|
@ -345,7 +345,7 @@ class TrackerIcons(Component):
|
||||||
d = f
|
d = f
|
||||||
if f.check(error.PageRedirect):
|
if f.check(error.PageRedirect):
|
||||||
# Handle redirect errors
|
# Handle redirect errors
|
||||||
location = error_msg.split(" to ")[1]
|
location = urljoin(host_to_url(host), error_msg.split(" to ")[1])
|
||||||
d = self.download_icon([(location, extension_to_mimetype(location.rpartition('.')[2]))] + icons, host)
|
d = self.download_icon([(location, extension_to_mimetype(location.rpartition('.')[2]))] + icons, host)
|
||||||
if not icons:
|
if not icons:
|
||||||
d.addCallbacks(self.on_download_icon_complete, self.on_download_icon_fail,
|
d.addCallbacks(self.on_download_icon_complete, self.on_download_icon_fail,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue