[Bug]: Cannot auto-import series numbers above 999 #3058

Open
opened 2026-04-25 00:13:20 +02:00 by adam · 4 comments
Owner

Originally created by @jrobelen on GitHub (Oct 29, 2025).

What happened?

In a folder import, if series number is 1000 or higher (i.e., four or more digits), the given series number will populate the year field.

What did you expect to happen?

I expect the series number part of the folder name to always populate the series number field regardless of the number.

Steps to reproduce the issue

  1. Setup a series of audio episodes in the usual style, folder with author's name, containing folder with series name, containing multiple folders with names setup as "series number - title".
  2. When series number is anything between 0 and 999, observe the folder is imported as expected. The series number and title populate their respective fields.
  3. When the series number is 1000 or greater, observe that number will auto-populate the year field.
  4. If a year or narrator is included in the folder naming per proper naming convention, any series number 1000 or above will populate the year field, and the year will be imported as part of the item's title.

Audiobookshelf version

v2.30.0

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

2025-10-29 03:11:19.735
DEBUG
[Scanner] Scanning file update groups in folder "181de1af-b619-4da8-acec-9a0bee010683" of library "audiobooks"
2025-10-29 03:11:19.735
DEBUG
[Scanner] scanFolderUpdates fileUpdateGroup { 'The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time': [ 'Another Place In Time.mp3' ], 'The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet': [ 'A Passage For Trumpet.mp3' ] }
2025-10-29 03:11:19.815
DEBUG
[LibraryScanner] Folder update group must be a new item "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time" in library "audiobooks"
2025-10-29 03:11:21.948
DEBUG
[AudioFileScanner] Smart track order for "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time" using track key trackNumFromMeta
2025-10-29 03:11:21.948
DEBUG
[Scan] "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time": "Another Place In Time" Getting metadata with precedence [audioMetatags, nfoFile, txtFiles, folderStructure, opfFile, absMetadata]
2025-10-29 03:11:22.423
DEBUG
[Scan] "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time": Extracted embedded cover from audio file at "/metadata/items/04287521-f2dc-4451-a838-268454cef797/cover.png" for book "Another Place In Time"
2025-10-29 03:11:26.868
DEBUG
[Scan] "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time": Success saving abmetadata to "/metadata/items/04287521-f2dc-4451-a838-268454cef797/metadata.json"
2025-10-29 03:11:26.869
DEBUG
[Scan] "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time": Created new library item "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time" with id "04287521-f2dc-4451-a838-268454cef797"
2025-10-29 03:11:26.910
DEBUG
[LibraryScanner] Folder update group must be a new item "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet" in library "audiobooks"
2025-10-29 03:11:27.298
DEBUG
[AudioFileScanner] Smart track order for "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet" using track key trackNumFromMeta
2025-10-29 03:11:27.298
DEBUG
[Scan] "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet": "A Passage For Trumpet" Getting metadata with precedence [audioMetatags, nfoFile, txtFiles, folderStructure, opfFile, absMetadata]
2025-10-29 03:11:27.572
DEBUG
[Scan] "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet": Extracted embedded cover from audio file at "/metadata/items/e90c74f6-b241-40e2-9e3f-9ab95a752711/cover.png" for book "A Passage For Trumpet"
2025-10-29 03:11:29.939
DEBUG
[Scan] "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet": Success saving abmetadata to "/metadata/items/e90c74f6-b241-40e2-9e3f-9ab95a752711/metadata.json"
2025-10-29 03:11:29.939
DEBUG
[Scan] "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet": Created new library item "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet" with id "e90c74f6-b241-40e2-9e3f-9ab95a752711"
2025-10-29 03:11:29.941
DEBUG
[LibraryScanner] Folder scan results { 'The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time': 1, 'The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet': 1 }

Additional Notes

  1. Docker running on Synology NAS [DSM 7.2.2-72806 Update 4]
  2. Some discussion on https://www.reddit.com/r/audiobookshelf/comments/1oij9jq/number_limit_for_series_scanner/
Originally created by @jrobelen on GitHub (Oct 29, 2025). ### What happened? In a folder import, if series number is 1000 or higher (i.e., four or more digits), the given series number will populate the year field. ### What did you expect to happen? I expect the series number part of the folder name to always populate the series number field regardless of the number. ### Steps to reproduce the issue 1. Setup a series of audio episodes in the usual style, folder with author's name, containing folder with series name, containing multiple folders with names setup as "series number - title". 2. When series number is anything between 0 and 999, observe the folder is imported as expected. The series number and title populate their respective fields. 3. When the series number is 1000 or greater, observe that number will auto-populate the year field. 4. If a year or narrator is included in the folder naming per proper naming convention, any series number 1000 or above will populate the year field, and the year will be imported as part of the item's title. ### Audiobookshelf version v2.30.0 ### 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 ```shell 2025-10-29 03:11:19.735 DEBUG [Scanner] Scanning file update groups in folder "181de1af-b619-4da8-acec-9a0bee010683" of library "audiobooks" 2025-10-29 03:11:19.735 DEBUG [Scanner] scanFolderUpdates fileUpdateGroup { 'The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time': [ 'Another Place In Time.mp3' ], 'The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet': [ 'A Passage For Trumpet.mp3' ] } 2025-10-29 03:11:19.815 DEBUG [LibraryScanner] Folder update group must be a new item "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time" in library "audiobooks" 2025-10-29 03:11:21.948 DEBUG [AudioFileScanner] Smart track order for "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time" using track key trackNumFromMeta 2025-10-29 03:11:21.948 DEBUG [Scan] "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time": "Another Place In Time" Getting metadata with precedence [audioMetatags, nfoFile, txtFiles, folderStructure, opfFile, absMetadata] 2025-10-29 03:11:22.423 DEBUG [Scan] "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time": Extracted embedded cover from audio file at "/metadata/items/04287521-f2dc-4451-a838-268454cef797/cover.png" for book "Another Place In Time" 2025-10-29 03:11:26.868 DEBUG [Scan] "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time": Success saving abmetadata to "/metadata/items/04287521-f2dc-4451-a838-268454cef797/metadata.json" 2025-10-29 03:11:26.869 DEBUG [Scan] "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time": Created new library item "The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time" with id "04287521-f2dc-4451-a838-268454cef797" 2025-10-29 03:11:26.910 DEBUG [LibraryScanner] Folder update group must be a new item "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet" in library "audiobooks" 2025-10-29 03:11:27.298 DEBUG [AudioFileScanner] Smart track order for "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet" using track key trackNumFromMeta 2025-10-29 03:11:27.298 DEBUG [Scan] "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet": "A Passage For Trumpet" Getting metadata with precedence [audioMetatags, nfoFile, txtFiles, folderStructure, opfFile, absMetadata] 2025-10-29 03:11:27.572 DEBUG [Scan] "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet": Extracted embedded cover from audio file at "/metadata/items/e90c74f6-b241-40e2-9e3f-9ab95a752711/cover.png" for book "A Passage For Trumpet" 2025-10-29 03:11:29.939 DEBUG [Scan] "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet": Success saving abmetadata to "/metadata/items/e90c74f6-b241-40e2-9e3f-9ab95a752711/metadata.json" 2025-10-29 03:11:29.939 DEBUG [Scan] "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet": Created new library item "The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet" with id "e90c74f6-b241-40e2-9e3f-9ab95a752711" 2025-10-29 03:11:29.941 DEBUG [LibraryScanner] Folder scan results { 'The Two Light Zone/Two Light Zone Radio Dramas/1806 - Another Place In Time': 1, 'The Two Light Zone/Two Light Zone Radio Dramas/602 - A Passage For Trumpet': 1 } ``` ### Additional Notes 1. Docker running on Synology NAS [DSM 7.2.2-72806 Update 4] 2. Some discussion on https://www.reddit.com/r/audiobookshelf/comments/1oij9jq/number_limit_for_series_scanner/
adam added the bug label 2026-04-25 00:13:20 +02:00
Author
Owner

@nichwall commented on GitHub (Oct 29, 2025):

I think this is behaving as expected because a 4 digit number at the beginning of the folder name is parsed as a year. If you want a 4 digit number to be parsed as the series sequence, you can use Vol #### - Title format as described in the documentation.
https://www.audiobookshelf.org/docs#book-title-folder-naming

@nichwall commented on GitHub (Oct 29, 2025): I think this is behaving as expected because a 4 digit number at the beginning of the folder name is parsed as a year. If you want a 4 digit number to be parsed as the series sequence, you can use `Vol #### - Title` format as described in the documentation. https://www.audiobookshelf.org/docs#book-title-folder-naming
Author
Owner

@jrobelen commented on GitHub (Oct 29, 2025):

Sorry, I haven't found in the documentation where says it will interpret 4-digit numerals as years.

But I have again tried all sorts of variations as instructed, and no matter what format I put the series number, with or without a year in the folder name, it either reads it in as a year or (if the year appears first) just ignores it, if it is 1000 or higher.

@jrobelen commented on GitHub (Oct 29, 2025): Sorry, I haven't found in the documentation where says it will interpret 4-digit numerals as years. But I have again tried all sorts of variations as instructed, and no matter what format I put the series number, with or without a year in the folder name, it either reads it in as a year or (if the year appears first) just ignores it, if it is 1000 or higher.
Author
Owner

@nichwall commented on GitHub (Oct 29, 2025):

Sorry, I haven't found in the documentation where says it will interpret 4-digit numerals as years.

From the docs:

Publish Year: The publish year must be the first part of the name OR directly after a series sequence, and separated by " - " on both sides.

Series Sequence: Case insensitive & decimals supported.
The sequence can be placed anywhere in the folder name.
It must be followed by " - " or ". "
If it is not at the beginning of the folder name, it must be preceded by " - " and "Vol" "Vol." "Volume" or "Book"

It doesn't specifically say that a 4 digit number is a year, but most series don't have more than 1000 entries and this overlaps with the publish year definition. I see you mentioned this is due to radio dramas, but I think those can fit as a podcast library better. Podcast support is still not great in ABS as the priority is audiobooks, but it does exist for serial publications like this.

If you want the number to be parsed as the series sequence you will need to add the descriptor so the parser can recognize it as a sequence. Each folder is scanned in isolation, so there is not logic to recognize there are 1000 other folders that follow the same pattern in the folder (and even if there was this extra logic, some people just throw everything in the same folder so this check would also handle those edge cases).

Edit to add: for clarification, have you tried something like The Two Light Zone/Two Light Zone Radio Dramas/Vol 1602 - A Passage For Trumpet": "A Passage For Trumpet"?

@nichwall commented on GitHub (Oct 29, 2025): > Sorry, I haven't found in the documentation where says it will interpret 4-digit numerals as years. > From the docs: ``` Publish Year: The publish year must be the first part of the name OR directly after a series sequence, and separated by " - " on both sides. Series Sequence: Case insensitive & decimals supported. The sequence can be placed anywhere in the folder name. It must be followed by " - " or ". " If it is not at the beginning of the folder name, it must be preceded by " - " and "Vol" "Vol." "Volume" or "Book" ``` It doesn't specifically say that a 4 digit number is a year, but most series don't have more than 1000 entries and this overlaps with the publish year definition. I see you mentioned this is due to radio dramas, but I think those can fit as a podcast library better. Podcast support is still not great in ABS as the priority is audiobooks, but it does exist for serial publications like this. If you want the number to be parsed as the series sequence you will need to add the descriptor so the parser can recognize it as a sequence. Each folder is scanned in isolation, so there is not logic to recognize there are 1000 other folders that follow the same pattern in the folder (and even if there was this extra logic, some people just throw everything in the same folder so this check would also handle those edge cases). Edit to add: for clarification, have you tried something like `The Two Light Zone/Two Light Zone Radio Dramas/Vol 1602 - A Passage For Trumpet": "A Passage For Trumpet"`?
Author
Owner

@jrobelen commented on GitHub (Oct 29, 2025):

Yes, I tried prefixing "Vol", "Vol.", "#" and "Book" to the folder name, with and without a year descriptor, and the scanner scooped the whole thing up as one title. If the year was at the beginning of the folder name, it was assigned to the year field and the remainder of the name was used as the title.

Image
@jrobelen commented on GitHub (Oct 29, 2025): Yes, I tried prefixing "Vol", "Vol.", "#" and "Book" to the folder name, with and without a year descriptor, and the scanner scooped the whole thing up as one title. If the year was at the beginning of the folder name, it was assigned to the year field and the remainder of the name was used as the title. <img width="443" height="261" alt="Image" src="https://github.com/user-attachments/assets/1ceff4b2-1540-4bd7-85c0-5e45d567cd99" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3058