mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-02-06 00:16:02 +01:00
Update:Setting new other ebook files as supplementary #1809
This commit is contained in:
parent
014fc45c15
commit
b60473d7ae
@ -459,6 +459,14 @@ class LibraryItem {
|
|||||||
if (matchingLibraryFile && this.media.ebookFile.updateFromLibraryFile(matchingLibraryFile)) {
|
if (matchingLibraryFile && this.media.ebookFile.updateFromLibraryFile(matchingLibraryFile)) {
|
||||||
hasUpdated = true
|
hasUpdated = true
|
||||||
}
|
}
|
||||||
|
// Set any other ebook files as supplementary
|
||||||
|
const suppEbookLibraryFiles = this.libraryFiles.filter(lf => lf.isEBookFile && !lf.isSupplementary && this.media.ebookFile.ino !== lf.ino)
|
||||||
|
if (suppEbookLibraryFiles.length) {
|
||||||
|
for (const libraryFile of suppEbookLibraryFiles) {
|
||||||
|
libraryFile.isSupplementary = true
|
||||||
|
}
|
||||||
|
hasUpdated = true
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const ebookLibraryFiles = this.libraryFiles.filter(lf => lf.isEBookFile && !lf.isSupplementary)
|
const ebookLibraryFiles = this.libraryFiles.filter(lf => lf.isEBookFile && !lf.isSupplementary)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user