Add:Audiobooks only library settings, supplementary ebooks #1664

This commit is contained in:
advplyr 2023-06-10 12:46:57 -05:00
parent 4b4fb33d8f
commit 014fc45c15
39 changed files with 624 additions and 122 deletions

View file

@ -1,5 +1,5 @@
class ScanOptions {
constructor(options) {
constructor() {
this.forceRescan = false
// Server settings
@ -10,26 +10,11 @@ class ScanOptions {
this.preferOpfMetadata = false
this.preferMatchedMetadata = false
this.preferOverdriveMediaMarker = false
if (options) {
this.construct(options)
}
}
construct(options) {
for (const key in options) {
if (key === 'metadataPrecedence' && options[key].length) {
this.metadataPrecedence = [...options[key]]
} else if (this[key] !== undefined) {
this[key] = options[key]
}
}
}
toJSON() {
return {
forceRescan: this.forceRescan,
metadataPrecedence: this.metadataPrecedence,
parseSubtitles: this.parseSubtitles,
findCovers: this.findCovers,
storeCoverWithItem: this.storeCoverWithItem,