mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 21:00:09 +00:00
f56efa8b15
Refactor bulk-import scanner to make ASIN extraction and search-string cleaning more robust, and add tests. - Tighten and case-insensitize the ASIN regex, always return ASIN in uppercase. - Export and use cleanSearchString (replaces inline folder-name sanitization in the scan route). - When merging discoveries across folders, derive folderName/relativePath consistently and re-extract ASIN from the merged common parent if available. - Add comprehensive unit/integration tests for extractAsinFromString, cleanSearchString, buildSearchTerm, and discoverAudiobooks (with an ffprobe mock). These changes improve detection of ASINs in varied naming patterns, reduce duplicated cleanup logic, and ensure merged groups correctly inherit ASIN metadata.