From 2bd69b26817402ae338a94b13a4194daedcc82ae Mon Sep 17 00:00:00 2001 From: shortcutme Date: Sun, 29 Apr 2018 14:53:31 +0200 Subject: [PATCH] Force reannounce to all trackers after meek bridges enabled --- src/Ui/UiWebsocket.py | 4 ++-- src/Ui/media/Loading.coffee | 2 +- src/Ui/media/all.js | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Ui/UiWebsocket.py b/src/Ui/UiWebsocket.py index b46bf08f..2b87f3d1 100644 --- a/src/Ui/UiWebsocket.py +++ b/src/Ui/UiWebsocket.py @@ -835,9 +835,9 @@ class UiWebsocket(object): site.websockets.append(self) # Update site content.json - def actionSiteUpdate(self, to, address, check_files=False, since=None): + def actionSiteUpdate(self, to, address, check_files=False, since=None, announce=False): def updateThread(): - site.update(check_files=check_files, since=since) + site.update(announce=announce, check_files=check_files, since=since) self.response(to, "Updated") site = self.server.sites.get(address) diff --git a/src/Ui/media/Loading.coffee b/src/Ui/media/Loading.coffee index 99b89e0e..7cd2479d 100644 --- a/src/Ui/media/Loading.coffee +++ b/src/Ui/media/Loading.coffee @@ -42,7 +42,7 @@ class Loading button.addClass("loading") @wrapper.ws.cmd "configSet", ["tor_use_bridges", ""] @wrapper.ws.cmd "configSet", ["trackers_proxy", "tor"] - @wrapper.ws.cmd "siteUpdate", @wrapper.site_info.address + @wrapper.ws.cmd "siteUpdate", {address: @wrapper.site_info.address, announce: true} @wrapper.reloadIframe() return false line.after(button) diff --git a/src/Ui/media/all.js b/src/Ui/media/all.js index 09200064..1c600620 100644 --- a/src/Ui/media/all.js +++ b/src/Ui/media/all.js @@ -640,7 +640,10 @@ jQuery.extend( jQuery.easing, button.addClass("loading"); _this.wrapper.ws.cmd("configSet", ["tor_use_bridges", ""]); _this.wrapper.ws.cmd("configSet", ["trackers_proxy", "tor"]); - _this.wrapper.ws.cmd("siteUpdate", _this.wrapper.site_info.address); + _this.wrapper.ws.cmd("siteUpdate", { + address: _this.wrapper.site_info.address, + announce: true + }); _this.wrapper.reloadIframe(); return false; }; @@ -711,6 +714,7 @@ jQuery.extend( jQuery.easing, }).call(this); + /* ---- src/Ui/media/Notifications.coffee ---- */ @@ -1727,7 +1731,6 @@ jQuery.extend( jQuery.easing, }).call(this); - /* ---- src/Ui/media/WrapperZeroFrame.coffee ---- */