mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-18 17:59:37 +00:00
Support cbr and cbz comics and comic reader #109
This commit is contained in:
parent
18c1d8f1a3
commit
88e2bac3f5
12 changed files with 276 additions and 20 deletions
|
|
@ -139,6 +139,10 @@ class Audiobook {
|
|||
return this.ebooks.find(file => file.ext === '.pdf')
|
||||
}
|
||||
|
||||
get hasComic() {
|
||||
return this.ebooks.find(file => file.ext === '.cbr' || file.ext === '.cbz')
|
||||
}
|
||||
|
||||
get hasMissingIno() {
|
||||
return !this.ino || this._audioFiles.find(abf => !abf.ino) || this._otherFiles.find(f => !f.ino) || this._tracks.find(t => !t.ino)
|
||||
}
|
||||
|
|
@ -210,7 +214,7 @@ class Audiobook {
|
|||
hasInvalidParts: this.invalidParts ? this.invalidParts.length : 0,
|
||||
// numEbooks: this.ebooks.length,
|
||||
ebooks: this.ebooks.map(ebook => ebook.toJSON()),
|
||||
numEbooks: (this.hasEpub || this.hasMobi || this.hasPdf) ? 1 : 0, // Only supporting epubs in the reader currently
|
||||
numEbooks: (this.hasEpub || this.hasMobi || this.hasPdf || this.hasComic) ? 1 : 0,
|
||||
numTracks: this.tracks.length,
|
||||
chapters: this.chapters || [],
|
||||
isMissing: !!this.isMissing,
|
||||
|
|
@ -237,7 +241,7 @@ class Audiobook {
|
|||
audioFiles: this._audioFiles.map(audioFile => audioFile.toJSON()),
|
||||
otherFiles: this._otherFiles.map(otherFile => otherFile.toJSON()),
|
||||
ebooks: this.ebooks.map(ebook => ebook.toJSON()),
|
||||
numEbooks: (this.hasEpub || this.hasMobi || this.hasPdf) ? 1 : 0,
|
||||
numEbooks: (this.hasEpub || this.hasMobi || this.hasPdf || this.hasComic) ? 1 : 0,
|
||||
numTracks: this.tracks.length,
|
||||
tags: this.tags,
|
||||
book: this.bookToJSON(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue