summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-20 14:05:17 +0300
committerPaul Buetow <paul@buetow.org>2026-05-20 14:05:17 +0300
commit67c90f9b9a7a861e0f6ab0f199d66cd411948fab (patch)
treefe35c18b66dcbd687574c9217e519a578c2faeaf
parentf27448bbd4bd1efbe62c37c10c8eb9fe7d629690 (diff)
Add doc comments to probe, auth, service packages (ja)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
-rw-r--r--player-server/internal/service/scan.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/player-server/internal/service/scan.go b/player-server/internal/service/scan.go
index fe9513b..4d6c53f 100644
--- a/player-server/internal/service/scan.go
+++ b/player-server/internal/service/scan.go
@@ -39,6 +39,7 @@ func NewScanService(appCtx context.Context, sc scanner.Scanner, mediaRoot string
}
}
+// TriggerRescan cancels any in-flight scan and starts a new one asynchronously.
func (s *scanService) TriggerRescan(ctx context.Context) error {
if s.scanner == nil {
return errors.New("scanner not configured")
@@ -80,6 +81,7 @@ func (s *scanService) TriggerRescan(ctx context.Context) error {
return nil
}
+// ScanProgress returns a snapshot of the current or most recent scan state.
func (s *scanService) ScanProgress(ctx context.Context) model.ScanProgress {
s.mu.Lock()
progress := s.progress