12 Commits

Author SHA1 Message Date
Jarian
061a3bdeb3 fix: replace greedy episode matcher with DP-based optimal assignment
- Replace greedy _precise_duration_match with O(n*m) DP for minimum-cost
  duration matching, ensuring globally optimal file-to-episode assignment
- Fix _dp_match_episodes: remove buggy new_cost2 transition that could
  double-assign episodes, fix backtracking logic
- Add _fallback_sequential helper for clean sequential fallback path
- All 8 mock episodes now match with 0-min duration difference,
  disc ordering preserved (D1=[1-3], D2=[4-6], D3=[7-8])
2026-07-05 17:27:59 +00:00
Jarian
0536496b8c feat: add DP-based episode matcher, add module architecture doc
- Add _dp_match_episodes: O(n*m) DP for minimum-cost file→episode assignment
  considering disc size, episode deltas, and TVDB duration (Issue #1)
- Wire DP matcher as primary strategy in _match_by_duration_and_order
- Add comprehensive module docstring with architecture overview (Issue #10)
2026-07-05 12:03:36 +00:00
jarianc
fd0d865858 Merge pull request 'fix: multi-format support, configurable fallback ratio (#12, #13)' (#29) from fix/issue-code-fixes-v2 into main
Reviewed-on: https://git.home.ms/jarianc/EpisodeMatcher/pulls/29
2026-07-05 07:03:29 -05:00
Jarian
0d6a219465 fix: support multiple video formats, configurable fallback ratio
- Accept .mkv, .mp4, .avi, .webm, .mov, .wmv, .flv, .m4v (Issue #12)
- CLI --extensions flag to filter formats
- Configurable MediaInfo fallback ratio via --fallback-ratio or env (Issue #13)
- Defaults: 45 min/GB, override with ~25 for 4K, ~60 for low-bitrate
2026-07-05 11:54:30 +00:00
jarianc
5aa37556d7 Merge pull request 'Fix security and ops issues (#2-#8)' (#24) from fix/issue-security-ops into main
Reviewed-on: https://git.home.ms/jarianc/EpisodeMatcher/pulls/24
2026-07-05 06:52:29 -05:00
Jarian
ec78c42e4e fix: add Docker deployment, nginx security headers, remove sys.path.insert
- Add Dockerfile, docker-compose.yml, .dockerignore (Issue #11)
- Add nginx config with CSP, HSTS, X-Frame-Options, X-Content-Type-Options headers (Issue #14)
- Hide server version via server_tokens off, strip x-response-time-ms (Issues #21, #22)
- Replace sys.path.insert with proper src.* imports + importlib fallback (Issue #7)
- Add config.json.example template (Issue #5)
2026-07-05 11:46:04 +00:00
Jarian
cedc0fd51e fix: address security and ops issues (#2-#8)
- Fix path traversal vulnerability in TVDB cache (CWE-22)
- Support TVDB_API_KEY env var to avoid hardcoded secrets
- Add config.json to .gitignore, remove from git history
- Add pyproject.toml for proper packaging, remove sys.path.insert
- Add file hash to duplicate detection (reduce false positives)
- Require --force flag for --auto-delete-duplicates deletion
- Log deletions to recovery manifest
- Create .env.example template
2026-07-05 08:07:05 +00:00
jarianc
b30c798280 Merge pull request 'CI: remove --no-cache for docker layer caching' (#23) from ci-fix-nocache into main
Reviewed-on: https://git.home.ms/jarianc/EpisodeMatcher/pulls/23
2026-07-04 22:22:33 -05:00
Jarian
748789423a CI: remove --no-cache for docker layer caching 2026-07-05 03:11:59 +00:00
Jarian
1b61337a28 CI: add generalized workflow 2026-07-05 02:46:27 +00:00
Jarian Cottingham
73dd3f261e Updated Episode Matcher to take hints about episodes on disc and delete flags 2025-08-09 12:09:52 -05:00
Jarian Cottingham
03b03d676f Initial Commit 2025-08-07 21:15:00 -05:00