Commit Graph

10 Commits

Author SHA1 Message Date
Copilot
e535809e74 fix: Fix deadlock in ConvertChapter when context cancelled during page processing (#152)
* Initial plan

* Fix deadlock in ConvertChapter when context is cancelled after wgConvertedPages.Add

Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>

* Fix test comments to remove placeholder issue references

Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
2025-12-20 14:26:33 -05:00
copilot-swe-agent[bot]
b80535d211 Fix formatting in setupTestCommand function
- Remove extra blank line after t.Helper() for Go formatting consistency

Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
2025-12-10 20:28:36 +00:00
copilot-swe-agent[bot]
3a2fb2a97e Add comprehensive documentation to shared functions
- Add detailed docstring to setupFormatFlag explaining parameters and usage
- Add detailed docstring to setupTestCommand explaining return values
- Use constant.DefaultConversion instead of hard-coded constant.WebP for better maintainability
- Clarify when bindViper should be true vs false

Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
2025-12-10 20:27:28 +00:00
copilot-swe-agent[bot]
c5de49a310 Refactor tests to use shared setupFormatFlag and helper function
- Create setupTestCommand helper function to reduce test duplication
- Update all format flag tests to use shared setupFormatFlag function
- Remove unused enumflag import from test file
- Ensures test consistency with production code
- All tests continue to pass

Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
2025-12-10 20:25:59 +00:00
copilot-swe-agent[bot]
a2feca6cca Fix format flag crash and add comprehensive tests
- Remove NoOptDefVal which caused the format flag to fail with space-separated values
- Add 5 comprehensive unit tests for format flag: space syntax, short form, equals syntax, default value, and case-insensitive
- Update README with detailed format flag documentation and examples
- Format flag now works with all syntaxes: --format webp, -f webp, --format=webp
- Default value (webp) is preserved and shown in help text

Co-authored-by: Belphemur <197810+Belphemur@users.noreply.github.com>
2025-12-10 20:19:10 +00:00
Antoine Aflalo
e26cf7a26a fix: test 2025-08-26 21:37:51 -04:00
Antoine Aflalo
4e5180f658 feat: add timeout option for chapter conversion to prevent hanging on problematic files
fixes #102
2025-08-26 21:34:52 -04:00
Antoine Aflalo
989ca2450d feat: support CBR files in optimize and watch commands
Fixes #75
2025-06-12 09:18:06 -04:00
Antoine Aflalo
efe1696bfa fix(memory): fix possible memory leak and add better tests 2025-02-13 20:02:45 -05:00
Antoine Aflalo
dd7b6a332c refactor: update import paths to use internal package 2025-02-13 19:43:18 -05:00