Skip to content

Conversation

@balazs-szucs
Copy link
Collaborator

@balazs-szucs balazs-szucs commented Dec 31, 2025

🚀 Pull Request

📝 Description

Bug report was submitted via Discord

This pull request improves accuracy of comic book metadata extraction, particularly for ComicInfo.xml files embedded in different archive formats. It introduces improved filename handling, more flexible detection of ComicInfo.xml files, and adds comprehensive tests to ensure correct parsing across various scenarios.

🛠️ Changes Implemented

Metadata extraction improvements:

  • Introduced a new processFilename method in CbxMetadataExtractor to clean up archive filenames by replacing underscores and hyphens with spaces before using them as fallback titles. This results in more human-readable titles when metadata is missing.
  • Updated all fallback and error paths in CbxMetadataExtractor to use the processed filename instead of the raw base name for the book title.

ComicInfo.xml detection enhancements:

  • Added a new static method isComicInfoName to robustly detect ComicInfo.xml files regardless of case or subdirectory location within archives, and updated all archive entry search logic to use this method for CBZ, CBR, and CB7 formats.

Testing improvements:

  • Added a comprehensive test class ComicInfoParsingIssuesTest covering a wide range of ComicInfo.xml extraction scenarios, including different cases, subdirectory locations, fallback logic, extended fields, and special characters. This ensures the extractor behaves correctly for real-world comic archives.

🧪 Testing Strategy

📸 Visual Changes (if applicable)

⚠️ Required Pre-Submission Checklist

  • Code adheres to project style guidelines and conventions
  • Branch synchronized with latest develop branch
  • Automated unit/integration tests added/updated to cover changes
  • All tests pass locally (./gradlew test for backend)
  • Manual testing completed in local development environment
  • Flyway migration versioning follows correct sequence (if database schema modified)
  • Documentation pull request submitted to booklore-docs (required for features or enhancements that introduce user-facing or visual changes)

💬 Additional Context (optional)

… titles

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
@acx10 acx10 added the enhancement Improvement to an existing feature label Jan 1, 2026
@acx10 acx10 merged commit 52329e6 into booklore-app:develop Jan 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants