refactor(release): move detect_media_type & enrich_from_probe to application/release
Both helpers are inspection-pipeline pieces, not filesystem use cases — they belong next to inspect_release, not next to move_media / resolve_destination / list_folder. The move also kills the lazy import that was hiding inside _resolve_parsed: alfred.application.filesystem.resolve_destination no longer triggers a cycle through alfred.application.filesystem __init__ when loading inspect_release. Top-level import restored. Call sites updated: inspect.py, test_detect_media_type.py, test_enrich_from_probe.py, testing/recognize_folders_in_downloads.py. Module docstrings + test-file docstrings updated to match the new location.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Tests for ``alfred.application.filesystem.enrich_from_probe``.
|
||||
"""Tests for ``alfred.application.release.enrich_from_probe``.
|
||||
|
||||
The function mutates a ``ParsedRelease`` in place using ffprobe ``MediaInfo``.
|
||||
Token-level values from the release name always win — only ``None`` fields
|
||||
@@ -18,7 +18,7 @@ Uses real ``ParsedRelease`` / ``MediaInfo`` instances — no mocking needed.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from alfred.application.filesystem.enrich_from_probe import enrich_from_probe
|
||||
from alfred.application.release.enrich_from_probe import enrich_from_probe
|
||||
from alfred.domain.release.value_objects import ParsedRelease
|
||||
from alfred.domain.shared.media import AudioTrack, MediaInfo, VideoTrack
|
||||
|
||||
|
||||
Reference in New Issue
Block a user