mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-06 15:35:03 +02:00
Add:Library specific setting for use square covers and remove from server settings #387
This commit is contained in:
parent
be4f11a60e
commit
d06c61b329
25 changed files with 69 additions and 74 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue