Add options to skip matching media items if they already have an ASIN/ISBN

This commit is contained in:
Selfhost Alt 2022-04-26 17:36:29 -07:00
parent d8ec3bd218
commit 84dd06dfc4
4 changed files with 45 additions and 4 deletions

View file

@ -4,6 +4,8 @@ const Logger = require('../../Logger')
class LibrarySettings {
constructor(settings) {
this.disableWatcher = false
this.skipMatchingMediaWithAsin = false
this.skipMatchingMediaWithIsbn = false
if (settings) {
this.construct(settings)
@ -12,11 +14,15 @@ class LibrarySettings {
construct(settings) {
this.disableWatcher = !!settings.disableWatcher
this.skipMatchingMediaWithAsin = !!settings.skipMatchingMediaWithAsin
this.skipMatchingMediaWithIsbn = !!settings.skipMatchingMediaWithIsbn
}
toJSON() {
return {
disableWatcher: this.disableWatcher
disableWatcher: this.disableWatcher,
skipMatchingMediaWithAsin: this.skipMatchingMediaWithAsin,
skipMatchingMediaWithIsbn: this.skipMatchingMediaWithIsbn
}
}