mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-06 15:35:03 +02:00
Merge remote-tracking branch 'origin/master' into auth_passportjs
This commit is contained in:
commit
95e6fef3d1
65 changed files with 1739 additions and 378 deletions
|
@ -20,6 +20,7 @@ class ServerSettings {
|
|||
// Metadata - choose to store inside users library item folder
|
||||
this.storeCoverWithItem = false
|
||||
this.storeMetadataWithItem = false
|
||||
this.metadataFileFormat = 'json'
|
||||
|
||||
// Security/Rate limits
|
||||
this.rateLimitLoginRequests = 10
|
||||
|
@ -94,6 +95,7 @@ class ServerSettings {
|
|||
|
||||
this.storeCoverWithItem = !!settings.storeCoverWithItem
|
||||
this.storeMetadataWithItem = !!settings.storeMetadataWithItem
|
||||
this.metadataFileFormat = settings.metadataFileFormat || 'json'
|
||||
|
||||
this.rateLimitLoginRequests = !isNaN(settings.rateLimitLoginRequests) ? Number(settings.rateLimitLoginRequests) : 10
|
||||
this.rateLimitLoginWindow = !isNaN(settings.rateLimitLoginWindow) ? Number(settings.rateLimitLoginWindow) : 10 * 60 * 1000 // 10 Minutes
|
||||
|
@ -175,6 +177,16 @@ class ServerSettings {
|
|||
if (settings.homeBookshelfView == undefined) { // homeBookshelfView was added in 2.1.3
|
||||
this.homeBookshelfView = settings.bookshelfView
|
||||
}
|
||||
if (settings.metadataFileFormat == undefined) { // metadataFileFormat was added in 2.2.21
|
||||
// All users using old settings will stay abs until changed
|
||||
this.metadataFileFormat = 'abs'
|
||||
}
|
||||
|
||||
// Validation
|
||||
if (!['abs', 'json'].includes(this.metadataFileFormat)) {
|
||||
Logger.error(`[ServerSettings] construct: Invalid metadataFileFormat ${this.metadataFileFormat}`)
|
||||
this.metadataFileFormat = 'json'
|
||||
}
|
||||
|
||||
if (this.logLevel !== Logger.logLevel) {
|
||||
Logger.setLogLevel(this.logLevel)
|
||||
|
@ -196,6 +208,7 @@ class ServerSettings {
|
|||
scannerUseTone: this.scannerUseTone,
|
||||
storeCoverWithItem: this.storeCoverWithItem,
|
||||
storeMetadataWithItem: this.storeMetadataWithItem,
|
||||
metadataFileFormat: this.metadataFileFormat,
|
||||
rateLimitLoginRequests: this.rateLimitLoginRequests,
|
||||
rateLimitLoginWindow: this.rateLimitLoginWindow,
|
||||
backupSchedule: this.backupSchedule,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue