From c10d4efd5e3ccc8276d1b7481af0777c6adab3da Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 16 Jan 2022 15:26:38 +0000 Subject: [PATCH] nix/pkgs/deluge: update path for trying empty login first --- .../deluge-web-try-empty-login-first.patch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nix/pkgs/deluge/deluge-web-try-empty-login-first.patch b/nix/pkgs/deluge/deluge-web-try-empty-login-first.patch index b635bebdd3..4ce1930306 100644 --- a/nix/pkgs/deluge/deluge-web-try-empty-login-first.patch +++ b/nix/pkgs/deluge/deluge-web-try-empty-login-first.patch @@ -1,14 +1,14 @@ -diff -ru deluge-2.0.3-orig/deluge/ui/web/js/deluge-all/LoginWindow.js deluge-2.0.3/deluge/ui/web/js/deluge-all/LoginWindow.js ---- deluge-2.0.3-orig/deluge/ui/web/js/deluge-all/LoginWindow.js 2019-06-06 16:23:52.000000000 +0000 -+++ deluge-2.0.3/deluge/ui/web/js/deluge-all/LoginWindow.js 2020-12-28 20:02:59.829316173 +0000 +diff -ru deluge-2.0.5-orig/deluge/ui/web/js/deluge-all/LoginWindow.js deluge-2.0.5/deluge/ui/web/js/deluge-all/LoginWindow.js +--- deluge-2.0.5-orig/deluge/ui/web/js/deluge-all/LoginWindow.js 2021-12-12 18:58:24.000000000 +0000 ++++ deluge-2.0.5/deluge/ui/web/js/deluge-all/LoginWindow.js 2022-01-16 15:25:45.463184041 +0000 @@ -66,6 +66,25 @@ }); }, -+ tryLoginThenShow: function() { ++ tryLoginThenShow: function () { + // HACK(lukegb): try logging in with no password. + deluge.client.auth.login('fixedSingleSignOnPassword!', { -+ success: function(result) { ++ success: function (result) { + if (!result) { + this.show(true); + return; @@ -17,14 +17,14 @@ diff -ru deluge-2.0.3-orig/deluge/ui/web/js/deluge-all/LoginWindow.js deluge-2.0 + this.hide(); + passwordField.setRawValue(''); + }, -+ failure: function(result) { ++ failure: function (result) { + this.show(true); + }, + scope: this, + }); + }, + - show: function(skipCheck) { + show: function (skipCheck) { if (this.firstShow) { deluge.client.on('error', this.onClientError, this); @@ -81,11 +100,11 @@ @@ -35,7 +35,7 @@ diff -ru deluge-2.0.3-orig/deluge/ui/web/js/deluge-all/LoginWindow.js deluge-2.0 + this.tryLoginThenShow(); } }, - failure: function(result) { + failure: function (result) { - this.show(true); + this.tryLoginThenShow(); },