mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-28 05:54:50 +02:00
Always sync file inodes, save http url covers in cover directory
This commit is contained in:
parent
4e45ff83c6
commit
28cbe0a95c
14 changed files with 355 additions and 94 deletions
|
@ -106,14 +106,19 @@ class Scanner {
|
|||
// check an audiobook exists with matching path, then update inodes
|
||||
existingAudiobook = this.audiobooks.find(a => a.path === audiobookData.path)
|
||||
if (existingAudiobook) {
|
||||
existingAudiobook.ino = audiobookData.ino
|
||||
hasUpdatedIno = true
|
||||
var filesUpdated = this.syncAudiobookInodeValues(existingAudiobook, audiobookData)
|
||||
Logger.info(`[Scanner] Updating inode value for "${existingAudiobook.title}" - ${filesUpdated} files updated`)
|
||||
}
|
||||
}
|
||||
|
||||
// Logger.debug(`[Scanner] Scanning "${audiobookData.title}" (${audiobookData.ino}) - ${!!existingAudiobook ? 'Exists' : 'New'}`)
|
||||
if (existingAudiobook) {
|
||||
// Always sync files and inode values
|
||||
var filesInodeUpdated = this.syncAudiobookInodeValues(existingAudiobook, audiobookData)
|
||||
if (hasUpdatedIno || filesInodeUpdated > 0) {
|
||||
Logger.info(`[Scanner] Updating inode value for "${existingAudiobook.title}" - ${filesInodeUpdated} files updated`)
|
||||
hasUpdatedIno = true
|
||||
}
|
||||
|
||||
|
||||
// TEMP: Check if is older audiobook and needs force rescan
|
||||
if (!forceAudioFileScan && existingAudiobook.checkNeedsAudioFileRescan()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue