advplyr / audiobookshelf

Self-hosted audiobook and podcast server
https://audiobookshelf.org
GNU General Public License v3.0
5.83k stars 404 forks source link

[Bug]: Different behavior from watcher scan and library scan (?) on short story collection #583

Closed soilheart closed 4 months ago

soilheart commented 2 years ago

Describe the issue

Using the following directly structure for a book with multiple short stories I get different behavior from the initial watcher scan (just copying the folder over and waiting) and library scan (Pressing the green "Scan" button on the "Libraries page").

└───Games Workshop
    └───The Horus Heresy
        ...
        └───20 - Various Authors - The Primarchs
            │   metadata.opf
            │   cover.jpg
            │
            ├───01 Graham McNeil -  The Reflection Crackd
            │       ...
            │       metadata.opf
            │       cover.jpg
            │
            ├───02 Nick Kyme - Feat Of Iron
            │       ...
            │       metadata.opf
            │       cover.jpg
            │
            ├───03 Gav Thorpe - The Lion
            │       ...
            │       metadata.opf
            │       cover.jpg
            │
            └───04 Rob Sanders - The Serpent Beneath
                    ...
                    metadata.opf
                    cover.jpg

The watcher scan seems to pick up the collection/"outer" folder as the book folder, but I press Scan on the libraries page the short stories/"inner" folders gets picked up instead (resulting in that the collection/outer folder getting the status "Missing", although all files are still visible and downloadable).

At first I suspected the .opf-files, but I have tried keeping just the outer/inner .opf file, but I think the behavior was the same (or it ignored the opf information, don't quite recall). The .opf files are there to set author and title (and for the inner folders series) as a workaround for #320, if that matters.

My main goal here is to find a consistent solution that works, I would have preferred the watcher scanning solution (the collection seen as a single book), but if the library scan solution were consistent I could accept that too.

Steps to reproduce the issue

  1. Have short stories as sub-folders to book/collection folder.
  2. Let watcher scan the folder
  3. Run library scan from Libraries page

Audiobookshelf version

v2.0.12

How are you running audiobookshelf?

Docker

soilheart commented 2 years ago

To clarify, this is not a huge issue for me at the moment, but I thought better to report it, in case it's obvious what the "issue" is and it's an easy fix.

advplyr commented 5 months ago

Is this still an issue on the latest version? The scanner has been re-written completely since this was posted

soilheart commented 4 months ago

Great question. Watcher functionality haven't worked for me for a while now (which some googling tells me is due to having changed from mounting the audiobook folder "directly" in the docker, to mounting it as an NFS share), so can't confirm that the watcher behavior have changed...

Normal library scan seems to work the same though, for what's that's worth...

Feel free to close the ticket, as I no longer can reproduce (due to watcher functionality not working on my current install)

advplyr commented 4 months ago

Thanks for the update!