From 8aa495df3b3da9213bdf29d7a15c1473fefcc63b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 9 May 2026 20:16:41 +0300 Subject: s1 add media rescan hotkey and progress indicator --- web/js/admin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/js/admin.js') diff --git a/web/js/admin.js b/web/js/admin.js index 86ad471..ac43643 100644 --- a/web/js/admin.js +++ b/web/js/admin.js @@ -1,5 +1,6 @@ import { API } from './api.js'; import { escapeHtml, toast } from './utils.js'; +import { triggerRescan } from './views/admin-status.js'; export function initAdmin() { const btn = document.getElementById('admin-toggle'); @@ -18,8 +19,7 @@ export function initAdmin() { rescanBtn?.addEventListener('click', async () => { rescanBtn.disabled = true; - try { await API.rescan(); toast('Rescan triggered'); } - catch (err) { toast(err.message, 'error'); } + try { await triggerRescan(); } finally { rescanBtn.disabled = false; } }); -- cgit v1.2.3