summaryrefslogtreecommitdiff
path: root/internal/api/handlers_admin.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-02 22:08:46 +0300
committerPaul Buetow <paul@buetow.org>2026-05-02 22:10:28 +0300
commite391bea837f9740aa8b303dedb6f87c09abd4201 (patch)
tree737ddbf8c58cd2b7acd0fb160494d9184e2c1983 /internal/api/handlers_admin.go
parente898357da954acb561a0a88b4443da52f774ce36 (diff)
fix detached playback and scan progress
Diffstat (limited to 'internal/api/handlers_admin.go')
-rw-r--r--internal/api/handlers_admin.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/api/handlers_admin.go b/internal/api/handlers_admin.go
index 246a466..e9935d4 100644
--- a/internal/api/handlers_admin.go
+++ b/internal/api/handlers_admin.go
@@ -33,6 +33,13 @@ func (s *Server) handleRescan(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusOK, map[string]string{"status": "ok"})
}
+func (s *Server) handleScanProgress(w http.ResponseWriter, r *http.Request) {
+ if !requireService(w, s.adminSvc) {
+ return
+ }
+ writeJSON(w, http.StatusOK, s.adminSvc.ScanProgress(r.Context()))
+}
+
func (s *Server) handleListUsers(w http.ResponseWriter, r *http.Request) {
if !requireService(w, s.adminSvc) {
return