luci-app-adblock: update 4.5.5-5

* sync with base package

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit c707d21a01)
This commit is contained in:
Dirk Brenken
2026-05-20 22:54:50 +02:00
parent f17251c78d
commit a08b85e249
2 changed files with 15 additions and 10 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ LUCI_TITLE:=LuCI support for Adblock
LUCI_DEPENDS:=+luci-base +luci-lib-uqr +adblock
PKG_VERSION:=4.5.5
PKG_RELEASE:=2
PKG_RELEASE:=5
PKG_LICENSE:=Apache-2.0
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
@@ -217,19 +217,24 @@ function handleAction(ev) {
L.resolveDefault(fs.exec_direct('/etc/init.d/adblock', ['report', 'gen', top_count, res_count, search]), '');
let attempts = 0;
let poller = setInterval(function () {
attempts++;
L.resolveDefault(fs.read('/var/run/adblock/adblock.report'), '').then(function (res) {
if (res && res.trim()) {
res = (res || '').trim();
if (res === '1') {
clearInterval(poller);
ui.hideModal();
location.reload();
} else if (attempts >= 40) {
clearInterval(poller);
document.querySelectorAll('.cbi-page-actions button').forEach(function (btn) {
btn.disabled = false;
});
document.getElementById('refresh').classList.remove('spinning');
ui.addNotification(null, E('p', _('Failed to generate adblock report!')), 'error');
} else if (res === '0') {
// keep polling
} else {
attempts++;
if (attempts >= 10) {
clearInterval(poller);
document.querySelectorAll('.cbi-page-actions button').forEach(function (btn) {
btn.disabled = false;
});
document.getElementById('refresh').classList.remove('spinning');
ui.addNotification(null, E('p', _('Failed to generate adblock report!')), 'error');
}
}
});
}, 3000);