Skip to content

feat: add on-disk media integrity checks and auto-remediation - #4

Merged
naveedious merged 7 commits into
mainfrom
feat/media-integrity
Aug 22, 2026
Merged

feat: add on-disk media integrity checks and auto-remediation#4
naveedious merged 7 commits into
mainfrom
feat/media-integrity

Conversation

@naveedious

Copy link
Copy Markdown
Owner

Summary

Extends Episode Guard to check existing on-disk episodes during lookahead cycles for corruption, truncation, or bad releases, and optionally auto-remediate via Sonarr.

Details

  • Tier 1 (Runtime Validation): Compares physical file duration against expected duration from Sonarr metadata (flagged if < 80% tolerance threshold).
  • Tier 2 (Stream & Tail Probe): Uses ffprobe and ffmpeg via bounded subprocesses to decode the final 30 seconds of the stream to /dev/null (-f null -), catching broken containers and EOF truncation without memory bloat.
  • Path Mapping & Graceful Fallback: Dynamic path prefix translation from Sonarr (e.g. /data/TV) to local container mounts (/tv), falling back to Sonarr API metadata if unmounted.
  • SQLite Verification Cache: Added verified_files table to prevent repeated I/O on already-verified files.
  • Remediation & Notifications: Added configurable setting (auto_remediate [deletes file via Sonarr API + triggers replacement search] vs notify_only vs disabled) plus Apprise alerts.
  • UI & Container: Added settings controls in Settings UI, event badges in Activity Log, installed ffmpeg in runtime image, and updated documentation.

@naveedious
naveedious merged commit aaf07e3 into main Aug 22, 2026
1 check passed
@naveedious
naveedious deleted the feat/media-integrity branch August 22, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant