unarr/internal/library
Deivid Soto 727ab19468 feat(mediainfo): ResolveFFmpeg + DownloadFFmpeg mirroring ffprobe pattern
Adds the ffmpeg-binary half of the resolution stack so the upcoming
WebRTC streaming transcoder (Fase 3.3) has a single point of entry.

Search order matches ResolveFFprobe so operators don't need to learn a
second mental model:
  1. Explicit path  (--ffmpeg flag / library.ffmpeg_path config)
  2. FFMPEG_PATH env var
  3. "ffmpeg" on PATH (system install)
  4. Adjacent to the unarr executable (release tarball bundles it here —
     this is the preferred path; see Fase 3.2 goreleaser changes)
  5. Cache dir (sibling of the cached ffprobe binary)
  6. Auto-download from ffbinaries.com (~70MB) as last resort

Includes:
- internal/library/mediainfo/ffmpeg.go         — ResolveFFmpeg + actionable
  Docker / non-Docker error messages
- internal/library/mediainfo/ffmpeg_download.go — DownloadFFmpeg, reuses
  ffprobePlatformKey + ffprobeAPIClient + ffprobeDLClient + extractFromZip
  helpers; bumps maxZipSize to 200MB (ffmpeg static is ~70-100MB)
- internal/config: LibraryConfig.FFmpegPath toml field for explicit paths
- 4 unit tests: explicit OK, explicit missing, env var, sibling cache path

Tarball bundling and the actual transcoding pipeline land in the next
two commits.
2026-05-06 09:49:32 +02:00
..
mediainfo feat(mediainfo): ResolveFFmpeg + DownloadFFmpeg mirroring ffprobe pattern 2026-05-06 09:49:32 +02:00
cache.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
cache_test.go feat: add migrate command, media server detection, and debrid auto-config 2026-03-29 16:54:32 +02:00
delete.go feat(library): add server-driven file deletion with allow_delete config 2026-04-10 16:35:12 +02:00
delete_test.go feat(library): add server-driven file deletion with allow_delete config 2026-04-10 16:35:12 +02:00
paths.go feat(scan): always scan downloads + organize dirs, deduplicate child paths 2026-04-10 11:46:20 +02:00
resolve.go fix(lint): use default:none to disable errcheck, fix all gofmt and exhaustive 2026-03-31 00:29:16 +02:00
resolve_test.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
scanner.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
scanner_test.go feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
sync.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
sync_test.go feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
types.go fix(lint): use default:none to disable errcheck, fix all gofmt and exhaustive 2026-03-31 00:29:16 +02:00