diff --git a/internal/scanner/audiobook_cover.go b/internal/scanner/audiobook_cover.go index 1b5ef260..f1d6d797 100644 --- a/internal/scanner/audiobook_cover.go +++ b/internal/scanner/audiobook_cover.go @@ -17,9 +17,9 @@ type audiobookCoverCacher interface { CacheAudiobookCover(ctx context.Context, data []byte, contentID string) (basePath string, ext string, thumbhash string, err error) } -// ffmpegPathFromFFprobe derives the ffmpeg binary path from a configured +// FFmpegPathFromFFprobe derives the ffmpeg binary path from a configured // ffprobe path. They live side by side in every silo deployment. -func ffmpegPathFromFFprobe(ffprobePath string) string { +func FFmpegPathFromFFprobe(ffprobePath string) string { if ffprobePath == "" { return "" } @@ -32,12 +32,12 @@ func ffmpegPathFromFFprobe(ffprobePath string) string { return "" } -// extractAndUploadAudiobookCover reads the embedded cover image (if any) +// ExtractAndUploadAudiobookCover reads the embedded cover image (if any) // from the given audio file via ffmpeg, pushes it through the silo // imagecache (resize + thumbhash + S3 upload), and returns the // poster_path S3 key plus thumbhash. Returns "", "" (no error) when no // embedded cover exists or the cacher is unavailable. -func extractAndUploadAudiobookCover( +func ExtractAndUploadAudiobookCover( ctx context.Context, ffmpegPath string, cacher audiobookCoverCacher, diff --git a/internal/scanner/audiobook_scan.go b/internal/scanner/audiobook_scan.go index 5577a28e..59130ea7 100644 --- a/internal/scanner/audiobook_scan.go +++ b/internal/scanner/audiobook_scan.go @@ -301,7 +301,7 @@ func (s *Scanner) reconcileAudiobookFolder(ctx context.Context, folder *models.M } } if len(parsed.Files) > 0 && s.imageCacher != nil { - poster, thumb := extractAndUploadAudiobookCover(ctx, ffmpegPathFromFFprobe(s.ffprobePath), s.imageCacher, parsed.Files[0].Path, contentID) + poster, thumb := ExtractAndUploadAudiobookCover(ctx, FFmpegPathFromFFprobe(s.ffprobePath), s.imageCacher, parsed.Files[0].Path, contentID) if poster != "" { if _, err := s.fileRepo.Pool().Exec(ctx, ` UPDATE media_items