Merge branch 'advplyr:master' into scan-for-narrator

This commit is contained in:
Cassie Esposito 2022-05-20 15:40:26 -07:00 committed by GitHub
commit 927c1a3514
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 61 additions and 52 deletions

View file

@ -5,10 +5,6 @@ class ServerSettings {
constructor(settings) {
this.id = 'server-settings'
// Misc/Unused
this.autoTagNew = false
this.newTagExpireDays = 15
// Scanner
this.scannerParseSubtitle = false
this.scannerFindCovers = false
@ -43,11 +39,16 @@ class ServerSettings {
// Podcasts
this.podcastEpisodeSchedule = '0 * * * *' // Every hour
// Sorting
this.sortingIgnorePrefix = false
this.sortingPrefixes = ['the', 'a']
// Misc Flags
this.chromecastEnabled = false
this.enableEReader = false
this.logLevel = Logger.logLevel
this.version = null
if (settings) {
@ -56,8 +57,6 @@ class ServerSettings {
}
construct(settings) {
this.autoTagNew = settings.autoTagNew
this.newTagExpireDays = settings.newTagExpireDays
this.scannerFindCovers = !!settings.scannerFindCovers
this.scannerCoverProvider = settings.scannerCoverProvider || 'google'
this.scannerParseSubtitle = settings.scannerParseSubtitle
@ -91,6 +90,7 @@ class ServerSettings {
this.sortingIgnorePrefix = !!settings.sortingIgnorePrefix
this.sortingPrefixes = settings.sortingPrefixes || ['the', 'a']
this.chromecastEnabled = !!settings.chromecastEnabled
this.enableEReader = !!settings.enableEReader
this.logLevel = settings.logLevel || Logger.logLevel
this.version = settings.version || null
@ -102,8 +102,6 @@ class ServerSettings {
toJSON() {
return {
id: this.id,
autoTagNew: this.autoTagNew,
newTagExpireDays: this.newTagExpireDays,
scannerFindCovers: this.scannerFindCovers,
scannerCoverProvider: this.scannerCoverProvider,
scannerParseSubtitle: this.scannerParseSubtitle,
@ -125,6 +123,7 @@ class ServerSettings {
sortingIgnorePrefix: this.sortingIgnorePrefix,
sortingPrefixes: [...this.sortingPrefixes],
chromecastEnabled: this.chromecastEnabled,
enableEReader: this.enableEReader,
logLevel: this.logLevel,
version: this.version
}

View file

@ -418,7 +418,7 @@ module.exports = {
books: [libraryItemJson],
inProgress: bookInProgress,
bookInProgressLastUpdate: bookInProgress ? mediaProgress.lastUpdate : null,
firstBookUnread: bookInProgress ? libraryItemJson : null
firstBookUnread: bookInProgress ? null : libraryItemJson
}
seriesMap[librarySeries.id] = series