diff --git a/client/components/modals/libraries/EditModal.vue b/client/components/modals/libraries/EditModal.vue index 434305b6..d305678d 100644 --- a/client/components/modals/libraries/EditModal.vue +++ b/client/components/modals/libraries/EditModal.vue @@ -47,6 +47,11 @@ export default { title: 'Settings', component: 'modals-libraries-library-settings' } + // { + // id: 'schedule', + // title: 'Schedule', + // component: 'modals-libraries-schedule-scan' + // } ], libraryCopy: null } @@ -84,6 +89,7 @@ export default { }, updateLibrary(library) { this.mapLibraryToCopy(library) + console.log('Updated library', this.libraryCopy) }, getNewLibraryData() { return { @@ -93,9 +99,11 @@ export default { icon: 'database', mediaType: 'book', settings: { + coverAspectRatio: this.$constants.BookCoverAspectRatio.SQUARE, disableWatcher: false, skipMatchingMediaWithAsin: false, - skipMatchingMediaWithIsbn: false + skipMatchingMediaWithIsbn: false, + autoScanCronExpression: null } } }, @@ -112,7 +120,9 @@ export default { if (key === 'folders') { this.libraryCopy.folders = library.folders.map((f) => ({ ...f })) } else if (key === 'settings') { - this.libraryCopy.settings = { ...library.settings } + for (const settingKey in library.settings) { + this.libraryCopy.settings[settingKey] = library.settings[settingKey] + } } else { this.libraryCopy[key] = library[key] } diff --git a/client/components/modals/libraries/ScheduleScan.vue b/client/components/modals/libraries/ScheduleScan.vue new file mode 100644 index 00000000..799c8e5d --- /dev/null +++ b/client/components/modals/libraries/ScheduleScan.vue @@ -0,0 +1,47 @@ + + + \ No newline at end of file diff --git a/client/components/widgets/CronExpressionBuilder.vue b/client/components/widgets/CronExpressionBuilder.vue new file mode 100644 index 00000000..973f861c --- /dev/null +++ b/client/components/widgets/CronExpressionBuilder.vue @@ -0,0 +1,192 @@ + + + \ No newline at end of file diff --git a/server/objects/settings/LibrarySettings.js b/server/objects/settings/LibrarySettings.js index 8dcaee07..7ce66a5f 100644 --- a/server/objects/settings/LibrarySettings.js +++ b/server/objects/settings/LibrarySettings.js @@ -6,6 +6,7 @@ class LibrarySettings { this.disableWatcher = false this.skipMatchingMediaWithAsin = false this.skipMatchingMediaWithIsbn = false + this.autoScanCronExpression = null if (settings) { this.construct(settings) @@ -17,6 +18,7 @@ class LibrarySettings { this.disableWatcher = !!settings.disableWatcher this.skipMatchingMediaWithAsin = !!settings.skipMatchingMediaWithAsin this.skipMatchingMediaWithIsbn = !!settings.skipMatchingMediaWithIsbn + this.autoScanCronExpression = settings.autoScanCronExpression || null } toJSON() { @@ -24,7 +26,8 @@ class LibrarySettings { coverAspectRatio: this.coverAspectRatio, disableWatcher: this.disableWatcher, skipMatchingMediaWithAsin: this.skipMatchingMediaWithAsin, - skipMatchingMediaWithIsbn: this.skipMatchingMediaWithIsbn + skipMatchingMediaWithIsbn: this.skipMatchingMediaWithIsbn, + autoScanCronExpression: this.autoScanCronExpression } }