summaryrefslogtreecommitdiff
path: root/web/js/app.js
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-09 20:16:41 +0300
committerPaul Buetow <paul@buetow.org>2026-05-09 20:16:41 +0300
commit8aa495df3b3da9213bdf29d7a15c1473fefcc63b (patch)
treefff04a324527e08b75a9667dd4e81b5a07a0ea0d /web/js/app.js
parentc68965ac297f6b4f0da4ad541e921646c320c489 (diff)
s1 add media rescan hotkey and progress indicator
Diffstat (limited to 'web/js/app.js')
-rw-r--r--web/js/app.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/js/app.js b/web/js/app.js
index 9ecd854..5590293 100644
--- a/web/js/app.js
+++ b/web/js/app.js
@@ -29,7 +29,7 @@ import { state } from './state.js';
import { initPWA } from './pwa.js';
import { closeAllModals } from './dom.js';
import { toast } from './utils.js';
-import { showAdmin } from './views/admin-status.js';
+import { showAdmin, triggerRescan } from './views/admin-status.js';
import { initHelp, showSearch, toggleHelp, toggleSidebar } from './views/help.js';
import {
initMediaGrid,
@@ -254,6 +254,9 @@ function keyboardHandlers() {
nextTrack: () => navigatePlayable(1, { forcePlay: true }),
prevTrack: () => navigatePlayable(-1, { forcePlay: true }),
playRandom: () => playRandom(),
+ rescanMedia: () => {
+ if (state.isAdmin) triggerRescan();
+ },
mediaInfo: () => toggleMediaInfo(),
fullscreen: () => toggleFullscreen(),
toggleMinimize: () => toggleMinimize(),