Clarified behaviour of Update options in batch quick match dialog and added flag in quickMatchLibraryItem to override the default system settings

This commit is contained in:
Nick Thomson 2022-09-23 18:53:30 +01:00
parent dbb62069ef
commit c3f2e606dd
2 changed files with 9 additions and 5 deletions

View File

@ -17,6 +17,7 @@
<p class="pr-4">Provider</p>
<ui-dropdown v-model="options.provider" :items="providers" small />
</div>
<p class="text-base px-8 py-2">Quick Match will attempt to add missing covers and metadata for the selected books. Enable the options below to allow Quick Match to overwrite existing covers and/or metadata.</p>
<div class="flex px-8 items-end py-2">
<ui-toggle-switch v-model="options.overrideCover"/>
<ui-tooltip :text="tooltips.updateCovers">
@ -56,11 +57,12 @@ export default {
options: {
provider: 'google',
overrideDetails: true,
overrideCover: true
overrideCover: true,
overrideDefaults: true
},
tooltips: {
updateCovers: 'Update the selected book covers when a match is located.',
updateDetails: 'Update the selected book details when a match is located.'
updateCovers: 'Allow overwriting of existing covers for the selected books when a match is located.',
updateDetails: 'Allow overwriting of existing details for the selected books when a match is located.'
}
}
},

View File

@ -675,9 +675,11 @@ class Scanner {
var provider = options.provider || 'google'
var searchTitle = options.title || libraryItem.media.metadata.title
var searchAuthor = options.author || libraryItem.media.metadata.authorName
var overrideDefaults = options.overrideDefaults || false
// Set to override existing metadata if scannerPreferMatchedMetadata setting is true
if (this.db.serverSettings.scannerPreferMatchedMetadata) {
// Set to override existing metadata if scannerPreferMatchedMetadata setting is true and
// the overrideDefaults option is not set or set to false.
if ((overrideDefaults == false) && (this.db.serverSettings.scannerPreferMatchedMetadata)) {
options.overrideCover = true
options.overrideDetails = true
}