mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-01 08:44:40 +02:00
This commit is contained in:
parent
0c168b3da4
commit
04f92c33c2
18 changed files with 258 additions and 149 deletions
|
@ -37,6 +37,8 @@ class Audiobook {
|
|||
|
||||
// Audiobook was scanned and not found
|
||||
this.isMissing = false
|
||||
// Audiobook no longer has "book" files
|
||||
this.isInvalid = false
|
||||
|
||||
if (audiobook) {
|
||||
this.construct(audiobook)
|
||||
|
@ -70,6 +72,7 @@ class Audiobook {
|
|||
}
|
||||
|
||||
this.isMissing = !!audiobook.isMissing
|
||||
this.isInvalid = !!audiobook.isInvalid
|
||||
}
|
||||
|
||||
get title() {
|
||||
|
@ -175,7 +178,8 @@ class Audiobook {
|
|||
audioFiles: this._audioFiles.map(audioFile => audioFile.toJSON()),
|
||||
otherFiles: this._otherFiles.map(otherFile => otherFile.toJSON()),
|
||||
chapters: this.chapters || [],
|
||||
isMissing: !!this.isMissing
|
||||
isMissing: !!this.isMissing,
|
||||
isInvalid: !!this.isInvalid
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,10 +201,12 @@ class Audiobook {
|
|||
hasMissingParts: this.missingParts ? this.missingParts.length : 0,
|
||||
hasInvalidParts: this.invalidParts ? this.invalidParts.length : 0,
|
||||
// numEbooks: this.ebooks.length,
|
||||
numEbooks: this.hasEpub ? 1 : 0,
|
||||
ebooks: this.ebooks.map(ebook => ebook.toJSON()),
|
||||
numEbooks: this.hasEpub ? 1 : 0, // Only supporting epubs in the reader currently
|
||||
numTracks: this.tracks.length,
|
||||
chapters: this.chapters || [],
|
||||
isMissing: !!this.isMissing
|
||||
isMissing: !!this.isMissing,
|
||||
isInvalid: !!this.isInvalid
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,15 +226,16 @@ class Audiobook {
|
|||
sizePretty: this.sizePretty,
|
||||
missingParts: this.missingParts,
|
||||
invalidParts: this.invalidParts,
|
||||
audioFiles: (this.audioFiles || []).map(audioFile => audioFile.toJSON()),
|
||||
otherFiles: (this.otherFiles || []).map(otherFile => otherFile.toJSON()),
|
||||
ebooks: (this.ebooks || []).map(ebook => ebook.toJSON()),
|
||||
audioFiles: this._audioFiles.map(audioFile => audioFile.toJSON()),
|
||||
otherFiles: this._otherFiles.map(otherFile => otherFile.toJSON()),
|
||||
ebooks: this.ebooks.map(ebook => ebook.toJSON()),
|
||||
numEbooks: this.hasEpub ? 1 : 0,
|
||||
tags: this.tags,
|
||||
book: this.bookToJSON(),
|
||||
tracks: this.tracksToJSON(),
|
||||
chapters: this.chapters || [],
|
||||
isMissing: !!this.isMissing
|
||||
isMissing: !!this.isMissing,
|
||||
isInvalid: !!this.isInvalid
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue