[Bug]: problem with detecting audiobooks with mixed structure #1101

Closed
opened 2026-04-24 23:32:16 +02:00 by adam · 5 comments
Owner

Originally created by @13werwolf13 on GitHub (Apr 25, 2023).

Describe the issue

On my audiobookshelf instance, I found the following problem: if the directory with the author contains both a directory with a cycle of works and directories with individual works not included in the cycle (example in the diagram below), then audiobookshelf sees only individual ones.

all_audiobook_dir
  author_dir
    single_book_dir
      single_book_file
    second_book_dir
      second_book_file
    cycle_dir
      first_cycle_book_dir
        first_cycle_book_dir
      second_cycle_book_dir
        second_cycle_book_dir

but if you take books out of the cycle as single ones, or transfer them to the directory of another author where there are only cycles, the problem is eliminated.

Steps to reproduce the issue

  1. create directories with files according to the hierarchy given above
  2. rescan library

Audiobookshelf version

v2.2.19

How are you running audiobookshelf?

Other

Originally created by @13werwolf13 on GitHub (Apr 25, 2023). ### Describe the issue On my audiobookshelf instance, I found the following problem: if the directory with the author contains both a directory with a cycle of works and directories with individual works not included in the cycle (example in the diagram below), then audiobookshelf sees only individual ones. ``` all_audiobook_dir author_dir single_book_dir single_book_file second_book_dir second_book_file cycle_dir first_cycle_book_dir first_cycle_book_dir second_cycle_book_dir second_cycle_book_dir ``` but if you take books out of the cycle as single ones, or transfer them to the directory of another author where there are only cycles, the problem is eliminated. ### Steps to reproduce the issue 1. create directories with files according to the hierarchy given above 2. rescan library ### Audiobookshelf version v2.2.19 ### How are you running audiobookshelf? Other
adam added the bug label 2026-04-24 23:32:16 +02:00
adam closed this issue 2026-04-24 23:32:16 +02:00
Author
Owner

@hobesman commented on GitHub (Apr 25, 2023):

In your example you have cycle > book dir > book dir. If that a typo?

If what you actually have is cycle > book dir > audio file, then this is a problem I haven't seen. Do you perhaps also have any files inside the cycle folder (a PDF, etc)?

What do the logs say when you scan with the items in the cycle folder along with the standalone books in the same author folder?

@hobesman commented on GitHub (Apr 25, 2023): In your example you have cycle > book dir > book dir. If that a typo? If what you actually have is cycle > book dir > audio file, then this is a problem I haven't seen. Do you perhaps also have any files inside the cycle folder (a PDF, etc)? What do the logs say when you scan with the items in the cycle folder along with the standalone books in the same author folder?
Author
Owner

@13werwolf13 commented on GitHub (Apr 25, 2023):

In your example you have cycle > book dir > book dir. If that a typo?

If what you actually have is cycle > book dir > audio file, then this is a problem I haven't seen. Do you perhaps also have any files inside the cycle folder (a PDF, etc)?

What do the logs say when you scan with the items in the cycle folder along with the standalone books in the same author folder?

Sorry, second first_cycle_book_dir is typo, that should be first_cycle_book_file

There are indeed other files in the directory, these are cover.jpg and readme.txt

During scanning, there are no errors in the logs (or rather, there are, but they relate to a completely different directory and I already know how to fix this).

After I created this issue, the problem itself was fixed for one author, but remained relevant for several others (I did nothing for this, apparently the fix came when scanning on the task scheduler).

@13werwolf13 commented on GitHub (Apr 25, 2023): > In your example you have cycle > book dir > book dir. If that a typo? > > If what you actually have is cycle > book dir > audio file, then this is a problem I haven't seen. Do you perhaps also have any files inside the cycle folder (a PDF, etc)? > > What do the logs say when you scan with the items in the cycle folder along with the standalone books in the same author folder? Sorry, second first_cycle_book_dir is typo, that should be first_cycle_book_file There are indeed other files in the directory, these are cover.jpg and readme.txt During scanning, there are no errors in the logs (or rather, there are, but they relate to a completely different directory and I already know how to fix this). After I created this issue, the problem itself was fixed for one author, but remained relevant for several others (I did nothing for this, apparently the fix came when scanning on the task scheduler).
Author
Owner

@hobesman commented on GitHub (Apr 25, 2023):

To clarify, are the readme files in the cycle folder? Or are they in the folder with the audio files?


From: Марков Дмитрий @.>
Sent: Tuesday, April 25, 2023 6:34:50 AM
To: advplyr/audiobookshelf @.
>
Cc: hobesman @.>; Comment @.>
Subject: Re: [advplyr/audiobookshelf] [Bug]: problem with detecting audiobooks with mixed structure (Issue #1718)

In your example you have cycle > book dir > book dir. If that a typo?

If what you actually have is cycle > book dir > audio file, then this is a problem I haven't seen. Do you perhaps also have any files inside the cycle folder (a PDF, etc)?

What do the logs say when you scan with the items in the cycle folder along with the standalone books in the same author folder?

Sorry, second first_cycle_book_dir is typo, that should be first_cycle_book_file

There are indeed other files in the directory, these are cover.jpg and readme.txt

During scanning, there are no errors in the logs (or rather, there are, but they relate to a completely different directory and I already know how to fix this).

After I created this issue, the problem itself was fixed for one author, but remained relevant for several others (I did nothing for this, apparently the fix came when scanning on the task scheduler).


Reply to this email directly, view it on GitHubhttps://github.com/advplyr/audiobookshelf/issues/1718#issuecomment-1521801618, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHCYJJLEEGPCBWCVKYB67MLXC7HHVANCNFSM6AAAAAAXKRVMBY.
You are receiving this because you commented.Message ID: @.***>

@hobesman commented on GitHub (Apr 25, 2023): To clarify, are the readme files in the cycle folder? Or are they in the folder with the audio files? ________________________________ From: Марков Дмитрий ***@***.***> Sent: Tuesday, April 25, 2023 6:34:50 AM To: advplyr/audiobookshelf ***@***.***> Cc: hobesman ***@***.***>; Comment ***@***.***> Subject: Re: [advplyr/audiobookshelf] [Bug]: problem with detecting audiobooks with mixed structure (Issue #1718) In your example you have cycle > book dir > book dir. If that a typo? If what you actually have is cycle > book dir > audio file, then this is a problem I haven't seen. Do you perhaps also have any files inside the cycle folder (a PDF, etc)? What do the logs say when you scan with the items in the cycle folder along with the standalone books in the same author folder? Sorry, second first_cycle_book_dir is typo, that should be first_cycle_book_file There are indeed other files in the directory, these are cover.jpg and readme.txt During scanning, there are no errors in the logs (or rather, there are, but they relate to a completely different directory and I already know how to fix this). After I created this issue, the problem itself was fixed for one author, but remained relevant for several others (I did nothing for this, apparently the fix came when scanning on the task scheduler). — Reply to this email directly, view it on GitHub<https://github.com/advplyr/audiobookshelf/issues/1718#issuecomment-1521801618>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHCYJJLEEGPCBWCVKYB67MLXC7HHVANCNFSM6AAAAAAXKRVMBY>. You are receiving this because you commented.Message ID: ***@***.***>
Author
Owner

@13werwolf13 commented on GitHub (Apr 25, 2023):

To clarify, are the readme files in the cycle folder? Or are they in the folder with the audio files?


From: Марков Дмитрий @.>
Sent: Tuesday, April 25, 2023 6:34:50 AM
To: advplyr/audiobookshelf @.
>
Cc: hobesman @.>; Comment @.>
Subject: Re: [advplyr/audiobookshelf] [Bug]: problem with detecting audiobooks with mixed structure (Issue #1718)

In your example you have cycle > book dir > book dir. If that a typo?

If what you actually have is cycle > book dir > audio file, then this is a problem I haven't seen. Do you perhaps also have any files inside the cycle folder (a PDF, etc)?

What do the logs say when you scan with the items in the cycle folder along with the standalone books in the same author folder?

Sorry, second first_cycle_book_dir is typo, that should be first_cycle_book_file

There are indeed other files in the directory, these are cover.jpg and readme.txt

During scanning, there are no errors in the logs (or rather, there are, but they relate to a completely different directory and I already know how to fix this).

After I created this issue, the problem itself was fixed for one author, but remained relevant for several others (I did nothing for this, apparently the fix came when scanning on the task scheduler).


Reply to this email directly, view it on GitHubhttps://github.com/advplyr/audiobookshelf/issues/1718#issuecomment-1521801618, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHCYJJLEEGPCBWCVKYB67MLXC7HHVANCNFSM6AAAAAAXKRVMBY.
You are receiving this because you commented.Message ID: @.***>

readme & cover in book directory (with audio files).

@13werwolf13 commented on GitHub (Apr 25, 2023): > To clarify, are the readme files in the cycle folder? Or are they in the folder with the audio files? > ________________________________ > From: Марков Дмитрий ***@***.***> > Sent: Tuesday, April 25, 2023 6:34:50 AM > To: advplyr/audiobookshelf ***@***.***> > Cc: hobesman ***@***.***>; Comment ***@***.***> > Subject: Re: [advplyr/audiobookshelf] [Bug]: problem with detecting audiobooks with mixed structure (Issue #1718) > > > In your example you have cycle > book dir > book dir. If that a typo? > > If what you actually have is cycle > book dir > audio file, then this is a problem I haven't seen. Do you perhaps also have any files inside the cycle folder (a PDF, etc)? > > What do the logs say when you scan with the items in the cycle folder along with the standalone books in the same author folder? > > Sorry, second first_cycle_book_dir is typo, that should be first_cycle_book_file > > There are indeed other files in the directory, these are cover.jpg and readme.txt > > During scanning, there are no errors in the logs (or rather, there are, but they relate to a completely different directory and I already know how to fix this). > > After I created this issue, the problem itself was fixed for one author, but remained relevant for several others (I did nothing for this, apparently the fix came when scanning on the task scheduler). > > — > Reply to this email directly, view it on GitHub<https://github.com/advplyr/audiobookshelf/issues/1718#issuecomment-1521801618>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHCYJJLEEGPCBWCVKYB67MLXC7HHVANCNFSM6AAAAAAXKRVMBY>. > You are receiving this because you commented.Message ID: ***@***.***> > readme & cover in book directory (with audio files).
Author
Owner

@advplyr commented on GitHub (Apr 29, 2023):

I'm guessing there was some issue while you were moving around files. If you remove all the books in question from the audiobookshelf database only then do a re-scan on the library this should fix the issue.
To remove the books only from the database press delete then uncheck "remove from filesystem" checkbox.

I don't see a reproducible bug here, but if you can consistently reproduce this let me know.

@advplyr commented on GitHub (Apr 29, 2023): I'm guessing there was some issue while you were moving around files. If you remove all the books in question from the audiobookshelf database only then do a re-scan on the library this should fix the issue. To remove the books only from the database press delete then uncheck "remove from filesystem" checkbox. I don't see a reproducible bug here, but if you can consistently reproduce this let me know.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1101