Update chapters modal, search page, fix version check, ignore matching audio file paths on rescan

This commit is contained in:
advplyr 2021-09-24 16:14:33 -05:00
parent 37c38e69df
commit e1fd74caaf
12 changed files with 146 additions and 32 deletions

View file

@ -100,7 +100,12 @@ class Scanner {
hasUpdatedAudioFiles = true
}
} else {
newAudioFiles.push(file)
var audioFileWithMatchingPath = existingAudiobook.getAudioFileByPath(file.fullPath)
if (audioFileWithMatchingPath) {
Logger.warn(`[Scanner] Audio file with path already exists with different inode, New: "${file.filename}" (${file.ino}) | Existing: ${audioFileWithMatchingPath.filename} (${audioFileWithMatchingPath.ino})`)
} else {
newAudioFiles.push(file)
}
}
})
if (newAudioFiles.length) {

View file

@ -425,6 +425,10 @@ class Audiobook {
return this.audioFiles.find(af => af.ino === ino)
}
getAudioFileByPath(fullPath) {
return this.audioFiles.find(af => af.fullPath === fullPath)
}
setChapters() {
// If 1 audio file without chapters, then no chapters will be set