Skip to content

[Bug]: Metadata Folder Structure Scanner Error for Series that go beyond 999 #5103

@JustinPhucHuynh

Description

@JustinPhucHuynh

What happened?

Example Directory Structure:
/Author/Series/1 - 2000 - Title 1
...
/Author/Series/999 - 2023 - Title 999
...
/Author/Series/1045 - 2026 - Title 1045

When the series sequence goes beyond 999, metadata parsing is inconsistent. Sometimes the Series will have the sequence number and sometimes it will not. The Year also seems to be mapped to title.

For example metadata.json:
"title": "2025",
"subtitle": "Title 1045",
"series": ["Series"],
"publishedYear": "1045"

What did you expect to happen?

Sequence, year, title should be parsed to the correct fields in metadata.json.

"title": "Title 1045",
"subtitle": null,
"series": ["Series #1045"],
"publishedYear": "2025"

Steps to reproduce the issue

  1. Library Settings for Scanner
  2. Set as 1 Audiobookshelf metadata file
  3. Set as 2 Folder Structure
  4. Disable the rest of metadata order of precedence.
  5. Create a directory "/Test/A Test/1456 - 2026 - Test, 1456"
  6. Copy any book file into the directory
  7. Initiate scan and check metadata.json

Json automatically produced:
{ "tags": [], "chapters": [], "title": "2026", "subtitle": "Test, 1456", "authors": [ "Test" ], "narrators": [], "series": [ "A Test" ], "genres": [], "publishedYear": "1456", "publishedDate": null, "publisher": null, "description": null, "isbn": null, "asin": null, "language": null, "explicit": false, "abridged": false }

Audiobookshelf version

v2.32.1

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Other (list in "Additional Notes" box)

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs

2026-03-04 10:47:30.889

DEBUG

[Scanner] scanFolderUpdates fileUpdateGroup { 'Test/A Test/1456 - 2026 - Test, 1456': [ 'test.cbz' ] }

2026-03-04 10:47:30.915

DEBUG

[LibraryScanner] Folder update group must be a new item "Test/A Test/1456 - 2026 - Test, 1456" in library "Books"

2026-03-04 10:47:30.915

DEBUG

[parseComicMetadata] Parsing comic metadata at "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/test.cbz"

2026-03-04 10:47:30.916

DEBUG

[CbzStreamZipComicBookExtractor] Opened comic book "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/test.cbz"

2026-03-04 10:47:30.916

DEBUG

[CbzStreamZipComicBookExtractor] Found 13 files in comic book "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/test.cbz"

2026-03-04 10:47:30.916

DEBUG

[Scan] "Test/A Test/1456 - 2026 - Test, 1456": "2026" Getting metadata with precedence [folderStructure, absMetadata]

2026-03-04 10:47:30.916

DEBUG

[CbzStreamZipComicBookExtractor] Closed comic book "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/test.cbz"

2026-03-04 10:47:30.917

DEBUG

[CbzStreamZipComicBookExtractor] Opened comic book "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/test.cbz"

2026-03-04 10:47:30.921

DEBUG

[CbzStreamZipComicBookExtractor] Extracted file "1171-001.png" from comic book "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/test.cbz" to "/metadata/items/916462a8-3534-4529-9328-909b47364588/cover.png"

2026-03-04 10:47:30.921

DEBUG

[CbzStreamZipComicBookExtractor] Closed comic book "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/test.cbz"

2026-03-04 10:47:30.923

DEBUG

[Scan] "Test/A Test/1456 - 2026 - Test, 1456": Extracted embedded cover from ebook file at "/metadata/items/916462a8-3534-4529-9328-909b47364588/cover.png" for book "2026"

2026-03-04 10:47:30.972

DEBUG

[Scan] "Test/A Test/1456 - 2026 - Test, 1456": Success saving abmetadata to "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/metadata.json"

2026-03-04 10:47:30.975

DEBUG

[ApiCacheManager] libraryItem.afterUpdate: Clearing cache

2026-03-04 10:47:30.975

DEBUG

[Scan] "Test/A Test/1456 - 2026 - Test, 1456": Created new library item "Test/A Test/1456 - 2026 - Test, 1456" with id "916462a8-3534-4529-9328-909b47364588"

2026-03-04 10:47:30.976

DEBUG

[LibraryScanner] Folder scan results { 'Test/A Test/1456 - 2026 - Test, 1456': 1 }

2026-03-04 10:47:31.101

DEBUG

[ApiCacheManager] count: 0 size: 0

2026-03-04 10:47:31.593

DEBUG

[ApiCacheManager] Cache miss: {"user":"JbGy1SV9FqbgdMnVF2uAeud6H8XmpPQxh0EGGq2QNYkGq6zG8XNV9xdQ7upwPsWY","url":"/libraries/b2238b74-3033-49d1-b9c8-0eff64a7b58b/series?sort=name&desc=0&filter=all&limit=24&page=0&minified=1&include=rssfeed,numEpisodesIncomplete,share"}

2026-03-04 10:47:33.602

DEBUG

[Watcher] File Added /mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/metadata.json

2026-03-04 10:47:33.602

DEBUG

[Watcher] Modified file in library "Books" and folder "3c34d11f-5299-45d6-9011-15d0812da23d" with relPath "/Test/A Test/1456 - 2026 - Test, 1456/metadata.json"

2026-03-04 10:47:33.604

DEBUG

[Watcher] Waiting to add file at "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/metadata.json". mtimeMs=1772650050967.6162 lastMTimeMs=0 (loop 0)

2026-03-04 10:47:36.606

DEBUG

[Watcher] File finished adding at "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/metadata.json"

2026-03-04 10:47:43.610

DEBUG

[Scanner] scanFolderUpdates fileUpdateGroup { 'Test/A Test/1456 - 2026 - Test, 1456': [ 'metadata.json' ] }

2026-03-04 10:47:43.643

DEBUG

[LibraryScanner] Folder update for relative path "Test/A Test/1456 - 2026 - Test, 1456" is in library item "2026" with id "916462a8-3534-4529-9328-909b47364588" - scan for updates

2026-03-04 10:47:43.665

DEBUG

[parseComicMetadata] Parsing comic metadata at "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/test.cbz"

2026-03-04 10:47:43.665

DEBUG

[CbzStreamZipComicBookExtractor] Opened comic book "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/test.cbz"

2026-03-04 10:47:43.666

DEBUG

[CbzStreamZipComicBookExtractor] Found 13 files in comic book "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/test.cbz"

2026-03-04 10:47:43.666

DEBUG

[Scan] "Test/A Test/1456 - 2026 - Test, 1456": "2026" Getting metadata with precedence [folderStructure, absMetadata]

2026-03-04 10:47:43.666

DEBUG

[CbzStreamZipComicBookExtractor] Closed comic book "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/test.cbz"

2026-03-04 10:47:43.667

DEBUG

[Scan] "Test/A Test/1456 - 2026 - Test, 1456": Found metadata file "/mnt/internal_hdd_18tb_pool/Media/Manga/Test/A Test/1456 - 2026 - Test, 1456/metadata.json"

2026-03-04 10:47:43.667

DEBUG

[Scan] "Test/A Test/1456 - 2026 - Test, 1456": Library item is up-to-date

2026-03-04 10:47:43.667

DEBUG

[LibraryScanner] Folder scan results { 'Test/A Test/1456 - 2026 - Test, 1456': 4 }

Additional Notes

Truenas Scale v25.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions