mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-15 09:42:25 +02:00
Add:Library specific setting for use square covers and remove from server settings #387
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
const { BookCoverAspectRatio } = require('../../utils/constants')
|
||||
const Logger = require('../../Logger')
|
||||
|
||||
class LibrarySettings {
|
||||
constructor(settings) {
|
||||
this.coverAspectRatio = BookCoverAspectRatio.SQUARE
|
||||
this.disableWatcher = false
|
||||
this.skipMatchingMediaWithAsin = false
|
||||
this.skipMatchingMediaWithIsbn = false
|
||||
@ -13,6 +13,7 @@ class LibrarySettings {
|
||||
}
|
||||
|
||||
construct(settings) {
|
||||
this.coverAspectRatio = !isNaN(settings.coverAspectRatio) ? settings.coverAspectRatio : BookCoverAspectRatio.SQUARE
|
||||
this.disableWatcher = !!settings.disableWatcher
|
||||
this.skipMatchingMediaWithAsin = !!settings.skipMatchingMediaWithAsin
|
||||
this.skipMatchingMediaWithIsbn = !!settings.skipMatchingMediaWithIsbn
|
||||
@ -20,6 +21,7 @@ class LibrarySettings {
|
||||
|
||||
toJSON() {
|
||||
return {
|
||||
coverAspectRatio: this.coverAspectRatio,
|
||||
disableWatcher: this.disableWatcher,
|
||||
skipMatchingMediaWithAsin: this.skipMatchingMediaWithAsin,
|
||||
skipMatchingMediaWithIsbn: this.skipMatchingMediaWithIsbn
|
||||
|
Reference in New Issue
Block a user