summaryrefslogtreecommitdiff
path: root/cmd/mediaplayer
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-30 13:20:16 +0300
committerPaul Buetow <paul@buetow.org>2026-04-30 13:20:16 +0300
commit291161bcecc8904d1bbe96a5a183ceadd37d5f0e (patch)
tree37fa80377fb90808b6d5420fb42f5c91c032b252 /cmd/mediaplayer
parent54bc9013aa0463962a1cfd67fa278de3d401d85a (diff)
ga — implement thumbnail and set cover regeneration end to end
- mediaService: implement RegenerateThumbnail and RegenerateSetCover - Inject thumb.Generator and probe.Prober into MediaService - Update NewMediaService constructor and all call sites - Add service tests for success, failure, permission denied, and not-found - Add API tests for cover regeneration and thumbnail error mapping - All tests pass
Diffstat (limited to 'cmd/mediaplayer')
-rw-r--r--cmd/mediaplayer/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/mediaplayer/main.go b/cmd/mediaplayer/main.go
index 3419763..7e5df5c 100644
--- a/cmd/mediaplayer/main.go
+++ b/cmd/mediaplayer/main.go
@@ -76,10 +76,10 @@ func run(args []string) error {
hasher := auth.NewBCryptHasher(12)
sm := auth.NewSessionManager(store, clk, time.Duration(cfg.SessionTimeoutHours)*time.Hour)
- mediaSvc := service.NewMediaService(store, clk, cfg.MediaRoot)
-
prober := probe.NewFFProber()
thumbGen := thumb.NewFFmpegGenerator()
+ mediaSvc := service.NewMediaService(store, clk, cfg.MediaRoot, thumbGen, prober)
+
fsScanner := scanner.NewFSScanner(store, prober, thumbGen, clk, cfg.MediaRoot)
adminSvc := service.NewAdminService(store, clk, hasher, fsScanner, cfg.MediaRoot)