mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-29 20:02:42 +01:00
Add:Library specific setting for use square covers and remove from server settings #387
This commit is contained in:
1 parent
be4f11a60e
commit
d06c61b329
25 files changed
+69
-74
No files matched your search
@@ -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