[Bug]: Doing a scan of Library some books are being recharacterized as other books #881

Closed
opened 2026-04-24 23:24:57 +02:00 by adam · 8 comments
Owner

Originally created by @ceramicwhite on GitHub (Jan 10, 2023).

Describe the issue

Manually scanning library some of my titles are being listed as the path has changed to location of other titles:

2023-01-10 12:20:40 [2023-01-10 12:20:40] WARN: [LibraryItem] Check scan item changed path "/library/Anthony Horowitz/James Bond/Book 0 - Forever and a Day" -> "/library/Jocko Willink/Extreme Ownership" (LibraryItem.js:344)
2023-01-10 12:20:40 [2023-01-10 12:20:40] WARN: [LibraryItem] Check scan item changed path "/library/Anthony Horowitz/James Bond/Book 45 - Trigger Mortis" -> "/library/John E. Douglas, Mark Olshaker/Mindhunter" (LibraryItem.js:344
;ABMETADATA2
#audiobookshelf v2.2.12

media=book
title=Trigger Mortis
subtitle=A James Bond Novel
authors=Anthony Horowitz
narrators=David Oyelowo
publishedYear=2015
publisher=Orion Publishing Group
isbn=
asin=B00YTB0ONE
language=English
genres=Mystery, Thriller & Suspense
series=James Bond #45
explicit=N
;ABMETADATA2
#audiobookshelf v2.2.12

media=book
title=Forever and a Day
subtitle=A James Bond Novel
authors=Anthony Horowitz
narrators=Matthew Goode
publishedYear=2018
publisher=HarperAudio
isbn=
asin=B07DWBLKH3
language=English
genres=Literature & Fiction, Mystery, Thriller & Suspense
series=James Bond #0
explicit=N
;ABMETADATA2
#audiobookshelf v2.2.12

media=book
title=Extreme Ownership
subtitle=How U.S. Navy SEALs Lead and Win
authors=Jocko Willink, Leif Babin
narrators=Jocko Willink, Leif Babin
publishedYear=2015
publisher=Macmillan Audio
isbn=
asin=B015TVHUA2
language=English
genres=Business & Careers, History
series=
explicit=N
;ABMETADATA2
#audiobookshelf v2.2.12

media=book
title=Trigger Mortis
subtitle=A James Bond Novel
authors=Anthony Horowitz
narrators=David Oyelowo
publishedYear=2015
publisher=Orion Publishing Group
isbn=
asin=B00YTB0ONE
language=English
genres=Mystery, Thriller & Suspense
series=James Bond #45
explicit=N

Extreme Ownership & Mindhunter are then listed as missing

If I then check the full path to files for the Bond books the paths are listed correctly in ABS: /library/Anthony Horowitz/James Bond/Book 0 - Forever and a Day/Book 0 - Forever and a Day.m4b

Steps to reproduce the issue

  1. Do a normal library scan from Settings--> Library

Audiobookshelf version

v2.2.12

How are you running audiobookshelf?

Docker

Originally created by @ceramicwhite on GitHub (Jan 10, 2023). ### Describe the issue Manually scanning library some of my titles are being listed as the path has changed to location of other titles: ``` 2023-01-10 12:20:40 [2023-01-10 12:20:40] WARN: [LibraryItem] Check scan item changed path "/library/Anthony Horowitz/James Bond/Book 0 - Forever and a Day" -> "/library/Jocko Willink/Extreme Ownership" (LibraryItem.js:344) 2023-01-10 12:20:40 [2023-01-10 12:20:40] WARN: [LibraryItem] Check scan item changed path "/library/Anthony Horowitz/James Bond/Book 45 - Trigger Mortis" -> "/library/John E. Douglas, Mark Olshaker/Mindhunter" (LibraryItem.js:344 ``` ``` ;ABMETADATA2 #audiobookshelf v2.2.12 media=book title=Trigger Mortis subtitle=A James Bond Novel authors=Anthony Horowitz narrators=David Oyelowo publishedYear=2015 publisher=Orion Publishing Group isbn= asin=B00YTB0ONE language=English genres=Mystery, Thriller & Suspense series=James Bond #45 explicit=N ``` ``` ;ABMETADATA2 #audiobookshelf v2.2.12 media=book title=Forever and a Day subtitle=A James Bond Novel authors=Anthony Horowitz narrators=Matthew Goode publishedYear=2018 publisher=HarperAudio isbn= asin=B07DWBLKH3 language=English genres=Literature & Fiction, Mystery, Thriller & Suspense series=James Bond #0 explicit=N ``` ``` ;ABMETADATA2 #audiobookshelf v2.2.12 media=book title=Extreme Ownership subtitle=How U.S. Navy SEALs Lead and Win authors=Jocko Willink, Leif Babin narrators=Jocko Willink, Leif Babin publishedYear=2015 publisher=Macmillan Audio isbn= asin=B015TVHUA2 language=English genres=Business & Careers, History series= explicit=N ``` ``` ;ABMETADATA2 #audiobookshelf v2.2.12 media=book title=Trigger Mortis subtitle=A James Bond Novel authors=Anthony Horowitz narrators=David Oyelowo publishedYear=2015 publisher=Orion Publishing Group isbn= asin=B00YTB0ONE language=English genres=Mystery, Thriller & Suspense series=James Bond #45 explicit=N ``` Extreme Ownership & Mindhunter are then listed as missing If I then check the full path to files for the Bond books the paths are listed correctly in ABS: `/library/Anthony Horowitz/James Bond/Book 0 - Forever and a Day/Book 0 - Forever and a Day.m4b` ### Steps to reproduce the issue 1. Do a normal library scan from `Settings--> Library` ### Audiobookshelf version v2.2.12 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:24:57 +02:00
adam closed this issue 2026-04-24 23:24:58 +02:00
Author
Owner

@advplyr commented on GitHub (Jan 11, 2023):

Are you able to consistently reproduce this? I wasn't able to just now in testing.

@advplyr commented on GitHub (Jan 11, 2023): Are you able to consistently reproduce this? I wasn't able to just now in testing.
Author
Owner

@ceramicwhite commented on GitHub (Jan 11, 2023):

@advplyr Yeah, I think the problem is if mounting a second library outside of /audiobooks.
For example mounting like this:

    volumes:
      - ./audiobooks:/audiobooks
      - ./audiobooks-backup:/library

When I switched back to:

    volumes:
      - ./audiobooks:/audiobooks/main
      - ./audiobooks-backup:/audiobooks/backup

It seems to be working as expected

@ceramicwhite commented on GitHub (Jan 11, 2023): @advplyr Yeah, I think the problem is if mounting a second library outside of `/audiobooks`. For example mounting like this: ``` volumes: - ./audiobooks:/audiobooks - ./audiobooks-backup:/library ``` When I switched back to: ``` volumes: - ./audiobooks:/audiobooks/main - ./audiobooks-backup:/audiobooks/backup ``` It seems to be working as expected
Author
Owner

@advplyr commented on GitHub (Jan 11, 2023):

Can you check if you have this log right before the logs you shared on changing paths:
[Scanner] scanFolderUpdates: Library item found by inode value "${existingLibraryItem.relPath} => ${itemDir}"

Hopefully you had debug logs turned on.

@advplyr commented on GitHub (Jan 11, 2023): Can you check if you have this log right before the logs you shared on changing paths: `[Scanner] scanFolderUpdates: Library item found by inode value "${existingLibraryItem.relPath} => ${itemDir}"` Hopefully you had debug logs turned on.
Author
Owner

@ceramicwhite commented on GitHub (Jan 12, 2023):

@advplyr
Debug on can't see that line anywhere:

2023-01-12 11:30:18 > audiobookshelf@2.2.12 start
2023-01-12 11:30:18 > node index.js
2023-01-12 11:30:18 
2023-01-12 11:30:19 Config /config /metadata
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: === Starting Server ===
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [Server] Init v2.2.12
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 0 Collections Loaded
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 0 Playlists Loaded
2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Set Log Level to DEBUG (Logger.js:86)
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 1 Libraries Loaded
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 1 Users Loaded
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 169 Authors Loaded
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 25 Series Loaded
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 542 Library Items Loaded
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [BackupManager] 0 Backups Found
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [BackupManager] Auto Backups are disabled
2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Daily Log file found 2023-01-07.txt (LogManager.js:85)
2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Daily Log file found 2023-01-08.txt (LogManager.js:85)
2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Daily Log file found 2023-01-09.txt (LogManager.js:85)
2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Daily Log file found 2023-01-10.txt (LogManager.js:85)
2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Daily Log file found 2023-01-11.txt (LogManager.js:85)
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [LogManager] Init current daily log filename: 2023-01-12.txt
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [Watcher] Initializing watcher for "remote".
2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: [Watcher] Init watcher for library folder path "/remote" (Watcher.js:34)
2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: Listening on port :80
2023-01-12 11:30:32 [2023-01-12 11:30:32] INFO: [Watcher] "remote" Ready
2023-01-12 11:30:32 [2023-01-12 11:30:32] INFO: [Server] Socket Connected DkuAvYdnimekl7dzAAAB
2023-01-12 11:30:32 [2023-01-12 11:30:32] DEBUG: [Server] User Online root (SocketAuthority.js:161)
2023-01-12 11:30:32 [2023-01-12 11:30:32] DEBUG: [DB] Updated user: 1 (Db.js:382)
2023-01-12 11:30:44 [2023-01-12 11:30:44] INFO: [Scanner] Starting library scan lscan_x943pj353pt7ekz3w7 for remote
2023-01-12 11:32:12 [2023-01-12 11:32:12] WARN: [LibraryItem] Check scan item changed path "/remote/Star Wars non-cannon/13 - Omen (Fate of the Jedi Book 2) (43.5 ABY)" -> "/remote/Stephen King/2009 - Under the Dome (read by Raul Esparza)" (LibraryItem.js:344)
2023-01-12 11:32:12 [2023-01-12 11:32:12] DEBUG: [LibraryItem] "Fate of the Jedi, Book 2: Omen" check scan cover removed (LibraryItem.js:379)
2023-01-12 11:32:12 [2023-01-12 11:32:12] WARN: [LibraryItem] Check scan item changed path "/remote/Star Wars non-cannon/12 - Dark Force Rising[The Thrawn Trilogy Book 2] (9 ABY)" -> "/remote/Stephen King/2008 - Duma Key (read by John Slattery)" (LibraryItem.js:344)
2023-01-12 11:32:12 [2023-01-12 11:32:12] DEBUG: [LibraryItem] "Star Wars: Dark Force Rising: The Thrawn Trilogy, Book 2" check scan cover removed (LibraryItem.js:379)
2023-01-12 11:32:12 [2023-01-12 11:32:12] WARN: [LibraryItem] Check scan item changed path "/remote/Star Wars non-cannon/10 - Shatterpoint (21.5 BBY)" -> "/remote/Stephen King/2002 - Everything's Eventual (14 short stories)" (LibraryItem.js:344)
2023-01-12 11:32:12 [2023-01-12 11:32:12] DEBUG: [LibraryItem] "Shatterpoint" check scan cover removed (LibraryItem.js:379)
2023-01-12 11:32:12 [2023-01-12 11:32:12] WARN: [LibraryItem] Check scan item changed path "/remote/Star Wars non-cannon/09 - Invincible (Legacy Of The Force Book 9) (40 ABY)" -> "/remote/Stephen King/1999 - Storm of the Century" (LibraryItem.js:344)
2023-01-12 11:32:12 [2023-01-12 11:32:12] DEBUG: [LibraryItem] "Legacy of the Force #9: Invincible" check scan cover removed (LibraryItem.js:379)
2023-01-12 11:32:12 [2023-01-12 11:32:12] WARN: [LibraryItem] Check scan item changed path "/remote/Star Wars non-cannon/08 - Solo Command[X-Wing Book 7] (7.5 ABY)" -> "/remote/Stephen King/1996 - The Regulators (read by Frank Muller)" (LibraryItem.js:344)
2023-01-12 11:32:12 [2023-01-12 11:32:12] DEBUG: [LibraryItem] "Star Wars: The X-Wing Series, Volume 7: Solo Command" check scan cover removed (LibraryItem.js:379)

2023-01-12.txt
2023-01-12_lscan_0wu5nvjjbvnbzacmlm.txt

Doing a rescan doesn't do anything but the books who's paths are being listed as a different titles, if I do individual rescans on those titles from the missing list they are then fixed. Also the books that paths are listed as change to another title if I check files full path they are still the correct pathing

@ceramicwhite commented on GitHub (Jan 12, 2023): @advplyr Debug on can't see that line anywhere: ``` 2023-01-12 11:30:18 > audiobookshelf@2.2.12 start 2023-01-12 11:30:18 > node index.js 2023-01-12 11:30:18 2023-01-12 11:30:19 Config /config /metadata 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: === Starting Server === 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [Server] Init v2.2.12 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 0 Collections Loaded 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 0 Playlists Loaded 2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Set Log Level to DEBUG (Logger.js:86) 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 1 Libraries Loaded 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 1 Users Loaded 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 169 Authors Loaded 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 25 Series Loaded 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [DB] 542 Library Items Loaded 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [BackupManager] 0 Backups Found 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [BackupManager] Auto Backups are disabled 2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Daily Log file found 2023-01-07.txt (LogManager.js:85) 2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Daily Log file found 2023-01-08.txt (LogManager.js:85) 2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Daily Log file found 2023-01-09.txt (LogManager.js:85) 2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Daily Log file found 2023-01-10.txt (LogManager.js:85) 2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: Daily Log file found 2023-01-11.txt (LogManager.js:85) 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [LogManager] Init current daily log filename: 2023-01-12.txt 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: [Watcher] Initializing watcher for "remote". 2023-01-12 11:30:19 [2023-01-12 11:30:19] DEBUG: [Watcher] Init watcher for library folder path "/remote" (Watcher.js:34) 2023-01-12 11:30:19 [2023-01-12 11:30:19] INFO: Listening on port :80 2023-01-12 11:30:32 [2023-01-12 11:30:32] INFO: [Watcher] "remote" Ready 2023-01-12 11:30:32 [2023-01-12 11:30:32] INFO: [Server] Socket Connected DkuAvYdnimekl7dzAAAB 2023-01-12 11:30:32 [2023-01-12 11:30:32] DEBUG: [Server] User Online root (SocketAuthority.js:161) 2023-01-12 11:30:32 [2023-01-12 11:30:32] DEBUG: [DB] Updated user: 1 (Db.js:382) 2023-01-12 11:30:44 [2023-01-12 11:30:44] INFO: [Scanner] Starting library scan lscan_x943pj353pt7ekz3w7 for remote 2023-01-12 11:32:12 [2023-01-12 11:32:12] WARN: [LibraryItem] Check scan item changed path "/remote/Star Wars non-cannon/13 - Omen (Fate of the Jedi Book 2) (43.5 ABY)" -> "/remote/Stephen King/2009 - Under the Dome (read by Raul Esparza)" (LibraryItem.js:344) 2023-01-12 11:32:12 [2023-01-12 11:32:12] DEBUG: [LibraryItem] "Fate of the Jedi, Book 2: Omen" check scan cover removed (LibraryItem.js:379) 2023-01-12 11:32:12 [2023-01-12 11:32:12] WARN: [LibraryItem] Check scan item changed path "/remote/Star Wars non-cannon/12 - Dark Force Rising[The Thrawn Trilogy Book 2] (9 ABY)" -> "/remote/Stephen King/2008 - Duma Key (read by John Slattery)" (LibraryItem.js:344) 2023-01-12 11:32:12 [2023-01-12 11:32:12] DEBUG: [LibraryItem] "Star Wars: Dark Force Rising: The Thrawn Trilogy, Book 2" check scan cover removed (LibraryItem.js:379) 2023-01-12 11:32:12 [2023-01-12 11:32:12] WARN: [LibraryItem] Check scan item changed path "/remote/Star Wars non-cannon/10 - Shatterpoint (21.5 BBY)" -> "/remote/Stephen King/2002 - Everything's Eventual (14 short stories)" (LibraryItem.js:344) 2023-01-12 11:32:12 [2023-01-12 11:32:12] DEBUG: [LibraryItem] "Shatterpoint" check scan cover removed (LibraryItem.js:379) 2023-01-12 11:32:12 [2023-01-12 11:32:12] WARN: [LibraryItem] Check scan item changed path "/remote/Star Wars non-cannon/09 - Invincible (Legacy Of The Force Book 9) (40 ABY)" -> "/remote/Stephen King/1999 - Storm of the Century" (LibraryItem.js:344) 2023-01-12 11:32:12 [2023-01-12 11:32:12] DEBUG: [LibraryItem] "Legacy of the Force #9: Invincible" check scan cover removed (LibraryItem.js:379) 2023-01-12 11:32:12 [2023-01-12 11:32:12] WARN: [LibraryItem] Check scan item changed path "/remote/Star Wars non-cannon/08 - Solo Command[X-Wing Book 7] (7.5 ABY)" -> "/remote/Stephen King/1996 - The Regulators (read by Frank Muller)" (LibraryItem.js:344) 2023-01-12 11:32:12 [2023-01-12 11:32:12] DEBUG: [LibraryItem] "Star Wars: The X-Wing Series, Volume 7: Solo Command" check scan cover removed (LibraryItem.js:379) ``` [2023-01-12.txt](https://github.com/advplyr/audiobookshelf/files/10405557/2023-01-12.txt) [2023-01-12_lscan_0wu5nvjjbvnbzacmlm.txt](https://github.com/advplyr/audiobookshelf/files/10405560/2023-01-12_lscan_0wu5nvjjbvnbzacmlm.txt) Doing a rescan doesn't do anything but the books who's paths are being listed as a different titles, if I do individual rescans on those titles from the missing list they are then fixed. Also the books that paths are listed as change to another title if I check files full path they are still the correct pathing
Author
Owner

@advplyr commented on GitHub (Feb 16, 2023):

I just realized this is the same as #1447 so I'll make that the primary.

I added the actual inode value to that log line in the most recent release as mentioned in #1447.

@advplyr commented on GitHub (Feb 16, 2023): I just realized this is the same as #1447 so I'll make that the primary. I added the actual inode value to that log line in the most recent release as mentioned in #1447.
Author
Owner

@advplyr commented on GitHub (Feb 16, 2023):

Nevermind, just read through this thread again and was mistaken. I'm not sure what is going on here.

@advplyr commented on GitHub (Feb 16, 2023): Nevermind, just read through this thread again and was mistaken. I'm not sure what is going on here.
Author
Owner

@ceramicwhite commented on GitHub (Feb 17, 2023):

@advplyr after reading through #1447 that's a common issue I have and may be connected. In actuality wrong covers showing on other titles is a persistent issue I've had for awhile, this one hasn't occurred in a couple weeks.

@ceramicwhite commented on GitHub (Feb 17, 2023): @advplyr after reading through #1447 that's a common issue I have and may be connected. In actuality wrong covers showing on other titles is a persistent issue I've had for awhile, this one hasn't occurred in a couple weeks.
Author
Owner

@advplyr commented on GitHub (Feb 17, 2023):

Ah okay then it is most likely the same issue then. We will use that thread as the main thread.

In the last release I updated the log line so it will print the inode value. I'm wondering what the inode value is for these folders because they are somehow the same value causing the overwrite.

waiting for an answer on that in #1447

@advplyr commented on GitHub (Feb 17, 2023): Ah okay then it is most likely the same issue then. We will use that thread as the main thread. In the last release I updated the log line so it will print the inode value. I'm wondering what the inode value is for these folders because they are somehow the same value causing the overwrite. waiting for an answer on that in #1447
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#881