Skip to content

Log full file paths and surface interlaced detection source#809

Merged
ptr727 merged 1 commit into
developfrom
feature/idet-detection-logging
Jul 9, 2026
Merged

Log full file paths and surface interlaced detection source#809
ptr727 merged 1 commit into
developfrom
feature/idet-detection-logging

Conversation

@ptr727

@ptr727 ptr727 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Why

Media log lines identified files by base name only, which is ambiguous when same-named files (e.g. 4K vs 1080p Movie (2020).mkv) live in different folders — you can't tell which one a warning refers to. Interlaced detections also didn't say, in one line, whether they came from a container metadata flag or the idet content scan.

What

Full file paths in media logs — ProcessFile, SidecarFile, and ProcessDriver report lines now log FullName, including the per-track dumps (via MediaProps construction). The static verify log keeps logging the actual file it verifies (scope or temp), now at full path.

Interlaced detection

  • FindInterlacedTracks is a pure predicate (no logging). It outs an FfMpegIdetInfo? that is non-null only when the idet scan detected interlacing (null for a metadata flag) — the object both signals the source and carries the evidence.
  • DeInterlace logs one warning reporting how it was detected, and for idet extracts the MultiFrame detail from the out object:
    Interlaced video detected : Format: "h264", Detected by: Idet, MultiFrame: 58.30% (TFF: 5123, BFF: 12, Progressive: 3001, Undetermined: 40) : "/media/…/Movie.mkv"
    Interlaced video detected : Format: "h264", Detected by: Metadata flag : "/media/…/Movie.mkv"
    

Log detail / consistency

  • Tags detected reports which tools see tags; Cover Art detected reports the format.
  • Normalised the log placeholder to {FileName} everywhere ({File} ×6 and a stray {fileName} renamed) — placeholder-name only, rendered text unchanged.

Notes

Logging/consistency change with no new unit-testable logic, so no test change. Build clean (0 warnings), csharpier + dotnet format clean, existing suite (162 tests) passes.

🤖 Generated with Claude Code

Media logs identified files by base name only, which is ambiguous when
same-named files (e.g. 4K vs 1080p) live in different folders. Log the
full path in ProcessFile, SidecarFile and ProcessDriver media lines,
including the track dumps (via MediaProps construction).

Interlaced detection:
- FindInterlacedTracks is a pure predicate; it outs an FfMpegIdetInfo
  that is non-null only when the idet scan detected interlacing (null
  for a container metadata flag).
- DeInterlace logs a single warning that reports how it was detected
  (Detected by: Idet / Metadata flag) and, for idet, extracts the
  MultiFrame evidence (percentage and field counts) from the out object.

Also enrich "Tags detected" (per-tool) and "Cover Art detected" (format),
and normalise the log placeholder to {FileName} everywhere ({File} and a
stray {fileName} renamed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 9, 2026 01:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves log disambiguation and troubleshooting for media processing by switching media-related log lines from base names to full paths and by making interlaced detection logs explicitly report the detection source (metadata flag vs FFmpeg idet scan), including idet evidence when applicable.

Changes:

  • Update media/sidecar/process-driver logging to emit FileInfo.FullName (full paths) instead of Name (base name) for clearer identification.
  • Refactor interlaced detection flow so FindInterlacedTracks becomes a pure predicate and returns idet evidence only when interlacing was detected by scan; DeInterlace logs a single, source-specific warning.
  • Normalize structured log placeholder naming to {FileName} for consistency.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
PlexCleaner/VideoProps.cs Normalizes {FileName} placeholder for cover art track logging.
PlexCleaner/SidecarFile.cs Switches sidecar/media log lines and MediaProps construction inputs to full paths.
PlexCleaner/ProcessFile.cs Switches many process log lines to full paths; enhances tags/cover-art logs; refactors interlaced detection + logging to surface detection source and idet details.
PlexCleaner/ProcessDriver.cs Switches driver/test logs to full paths and normalizes {FileName} placeholders.

@ptr727
ptr727 merged commit 070e018 into develop Jul 9, 2026
15 checks passed
@ptr727
ptr727 deleted the feature/idet-detection-logging branch July 9, 2026 02:05
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.

2 participants