Add headless CLI, log rotation, configurable languages, and Windows subprocess fix - #2
Merged
Merged
Conversation
… bundled MediaInfo/pycache files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's new
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.audiocleaner_log.txtnow rotates automatically at 5MB (keeping 2 backups), so a long-running Watch Mode instance no longer grows the log file without bound.--languagesin the CLI (e.g.--languages eng,jpn). Default behavior (English only) is unchanged.subprocess.run()calls for mkvmerge/mediainfo now explicitly passstdin=subprocess.DEVNULL. Previously, an inherited-but-invalid stdin handle could raiseOSError: [WinError 6] The handle is invalidon Windows in some launch contexts (e.g. a windowed/console-less process).MediaInfo.exe,LIBCURL.DLL,Contrib/,Plugin/, etc.), PyInstaller build artifacts, and a stray compiled.pycfile..gitignoreupdated accordingly, andbuild.batnow checks for the MediaInfo files first and gives a clear download link if they're missing, instead of failing inside PyInstaller.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 intests/test_integration_fixtures.py.