From 0e96465d745bcd60bd2efbadf7d882bc175c9e95 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 22 Oct 2022 09:01:00 -0500 Subject: [PATCH] Remove old coverAspectRatio server setting --- client/pages/config/index.vue | 6 ------ client/store/index.js | 4 ---- server/objects/settings/ServerSettings.js | 11 ++--------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/client/pages/config/index.vue b/client/pages/config/index.vue index be26f331..714696db 100644 --- a/client/pages/config/index.vue +++ b/client/pages/config/index.vue @@ -288,7 +288,6 @@ export default { bookshelfView: 'Alternative view without wooden bookshelf', storeCoverWithItem: 'By default covers are stored in /metadata/items, enabling this setting will store covers in your library item folder. Only one file named "cover" will be kept', storeMetadataWithItem: 'By default metadata files are stored in /metadata/items, enabling this setting will store metadata files in your library item folders. Uses .abs file extension', - coverAspectRatio: 'Prefer to use square covers over standard 1.6:1 book covers', enableEReader: 'E-reader is still a work in progress, but use this setting to open it up to all your users (or use the "Experimental Features" toggle just for use by you)', scannerPreferOverdriveMediaMarker: 'MP3 files from Overdrive come with chapter timings embedded as custom metadata. Enabling this will use these tags for chapter timings automatically', scannerUseSingleThreadedProber: 'The old scanner used a single thread. Leaving it in to use as a comparison for now.', @@ -359,11 +358,6 @@ export default { scannerCoverProvider: val }) }, - updateBookCoverAspectRatio(val) { - this.updateServerSettings({ - coverAspectRatio: val ? this.$constants.BookCoverAspectRatio.SQUARE : this.$constants.BookCoverAspectRatio.STANDARD - }) - }, updateHomeAlternativeBookshelfView(val) { this.updateServerSettings({ homeBookshelfView: val ? this.$constants.BookshelfView.TITLES : this.$constants.BookshelfView.STANDARD diff --git a/client/store/index.js b/client/store/index.js index f55d6077..1feb094d 100644 --- a/client/store/index.js +++ b/client/store/index.js @@ -37,10 +37,6 @@ export const getters = { if (!state.serverSettings) return null return state.serverSettings[key] }, - getBookCoverAspectRatio: state => { - if (!state.serverSettings || isNaN(state.serverSettings.coverAspectRatio)) return 1 - return state.serverSettings.coverAspectRatio === 0 ? 1.6 : 1 - }, getNumLibraryItemsSelected: state => state.selectedLibraryItems.length, getLibraryItemIdStreaming: state => { return state.streamLibraryItem ? state.streamLibraryItem.id : null diff --git a/server/objects/settings/ServerSettings.js b/server/objects/settings/ServerSettings.js index 85efb70c..9a44f0df 100644 --- a/server/objects/settings/ServerSettings.js +++ b/server/objects/settings/ServerSettings.js @@ -1,4 +1,4 @@ -const { BookCoverAspectRatio, BookshelfView } = require('../../utils/constants') +const { BookshelfView } = require('../../utils/constants') const { isNullOrNaN } = require('../../utils') const Logger = require('../../Logger') @@ -29,8 +29,7 @@ class ServerSettings { this.rateLimitLoginWindow = 10 * 60 * 1000 // 10 Minutes // Backups - // this.backupSchedule = '30 1 * * *' // If false then auto-backups are disabled (default every day at 1:30am) - this.backupSchedule = false + this.backupSchedule = false // If false then auto-backups are disabled this.backupsToKeep = 2 this.maxBackupSize = 1 this.backupMetadataCovers = true @@ -39,10 +38,6 @@ class ServerSettings { this.loggerDailyLogsToKeep = 7 this.loggerScannerLogsToKeep = 2 - // Cover - // TODO: Remove after mobile apps are configured to use library server settings - this.coverAspectRatio = BookCoverAspectRatio.SQUARE - // Bookshelf Display this.homeBookshelfView = BookshelfView.STANDARD this.bookshelfView = BookshelfView.STANDARD @@ -99,7 +94,6 @@ class ServerSettings { this.loggerDailyLogsToKeep = settings.loggerDailyLogsToKeep || 7 this.loggerScannerLogsToKeep = settings.loggerScannerLogsToKeep || 2 - this.coverAspectRatio = !isNaN(settings.coverAspectRatio) ? settings.coverAspectRatio : BookCoverAspectRatio.SQUARE this.homeBookshelfView = settings.homeBookshelfView || BookshelfView.STANDARD this.bookshelfView = settings.bookshelfView || BookshelfView.STANDARD @@ -152,7 +146,6 @@ class ServerSettings { backupMetadataCovers: this.backupMetadataCovers, loggerDailyLogsToKeep: this.loggerDailyLogsToKeep, loggerScannerLogsToKeep: this.loggerScannerLogsToKeep, - coverAspectRatio: this.coverAspectRatio, homeBookshelfView: this.homeBookshelfView, bookshelfView: this.bookshelfView, sortingIgnorePrefix: this.sortingIgnorePrefix,