Skip to content

Add headless CLI, log rotation, configurable languages, and Windows subprocess fix - #2

Merged
quinnuk merged 4 commits into
mainfrom
feature/audio-cleaner
Aug 13, 2026
Merged

quinnuk merged 4 commits into
mainfrom
feature/audio-cleaner

Conversation

@quinnuk

@quinnuk quinnuk commented Aug 13, 2026

Copy link
Copy Markdown
Owner

What's new

  • Headless CLI mode (python main.py scan <folder> [options]) — run scans or continuous watching from the command line, no GUI/display required. Supports --dry-run, --watch, --languages, --keep-commentary, --subtitle-filter, --max-safety-mode, --persistent-backup, --quiet.
  • Log rotation — audiocleaner_log.txt now rotates automatically at 5MB (keeping 2 backups), so a long-running Watch Mode instance no longer grows the log file without bound.
  • Configurable preferred language(s) — audio language selection is no longer hardcoded to English; exposed via --languages in the CLI (e.g. --languages eng,jpn). Default behavior (English only) is unchanged.
  • Fixed a real Windows bug — subprocess.run() calls for mkvmerge/mediainfo now explicitly pass stdin=subprocess.DEVNULL. Previously, an inherited-but-invalid stdin handle could raise OSError: [WinError 6] The handle is invalid on Windows in some launch contexts (e.g. a windowed/console-less process).
  • Repo cleanup — stopped tracking the bundled MediaInfo CLI distribution (MediaInfo.exe, LIBCURL.DLL, Contrib/, Plugin/, etc.), PyInstaller build artifacts, and a stray compiled .pyc file. .gitignore updated accordingly, and build.bat now checks for the MediaInfo files first and gives a clear download link if they're missing, instead of failing inside PyInstaller.
  • README updated with CLI usage docs and a new Repo Notes section.

Testing

16 new tests added (tests/test_cli.py, tests/test_logger_rotation.py). Full suite (82 tests) passes, including the real-mkvmerge integration tests in tests/test_integration_fixtures.py.

@quinnuk
quinnuk merged commit 651fa33 into main Aug 13, 2026
2 checks passed
@quinnuk
quinnuk deleted the feature/audio-cleaner branch August 13, 2026 12:09
@quinnuk
quinnuk restored the feature/audio-cleaner branch August 13, 2026 12:23
@quinnuk
quinnuk deleted the feature/audio-cleaner branch August 13, 2026 17:04
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