Add a minimum confidence level threshold to match after scan runs.

This commit is contained in:
Marke Hallowell 2025-11-07 23:28:21 -08:00
parent 0ab72d879e
commit 3a751f711a
7 changed files with 54 additions and 7 deletions

View file

@ -126,6 +126,7 @@ export default {
skipMatchingMediaWithIsbn: false,
autoScanCronExpression: null,
matchAfterScan: false,
matchMinConfidence: 0,
hideSingleBookSeries: false,
onlyShowLaterBooksInContinueSeries: false,
metadataPrecedence: ['folderStructure', 'audioMetatags', 'nfoFile', 'txtFiles', 'opfFile', 'absMetadata'],

View file

@ -9,6 +9,10 @@
<div class="mt-4">
<ui-checkbox v-model="matchAfterScan" @input="updateMatchAfterScan" :label="$strings.LabelMatchAfterScan" medium checkbox-bg="bg" label-class="pl-2 text-base" />
</div>
<div class="mt-4" v-if="matchAfterScan">
<label class="px-1 text-sm font-semibold">{{ $strings.LabelMatchMinConfidence }}</label>
<ui-range-input v-model.number="matchMinConfidencePercentage" :min="0" :max="100" :step="1" />
</div>
</div>
<div v-else>
<p class="text-yellow-400 text-base">{{ $strings.MessageScheduleLibraryScanNote }}</p>
@ -29,10 +33,21 @@ export default {
return {
cronExpression: null,
enableAutoScan: false,
matchAfterScan: false
matchAfterScan: false,
matchMinConfidence: 0
}
},
computed: {
matchMinConfidencePercentage: {
get() {
return this.matchMinConfidence * 100
},
set(val) {
this.matchMinConfidence = val / 100
this.updateMatchMinConfidence()
}
}
},
computed: {},
methods: {
checkBlurExpressionInput() {
// returns true if advanced cron input is focused
@ -60,10 +75,18 @@ export default {
}
})
},
updateMatchMinConfidence() {
this.$emit('update', {
settings: {
matchMinConfidence: this.matchMinConfidence
}
})
},
init() {
this.cronExpression = this.library.settings.autoScanCronExpression
this.enableAutoScan = !!this.cronExpression
this.matchAfterScan = this.library.settings.matchAfterScan
this.matchMinConfidence = this.library.settings.matchMinConfidence || 0
}
},
mounted() {