This commit is contained in:
Marke Hallowell 2026-05-05 20:10:09 -07:00 committed by GitHub
commit d5c4c0f800
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 221 additions and 106 deletions

View file

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

View file

@ -4,7 +4,16 @@
<p class="text-base md:text-xl font-semibold">{{ $strings.HeaderScheduleLibraryScans }}</p>
<ui-checkbox v-model="enableAutoScan" @input="toggleEnableAutoScan" :label="$strings.LabelEnable" medium checkbox-bg="bg" label-class="pl-2 text-base md:text-lg" />
</div>
<widgets-cron-expression-builder ref="cronExpressionBuilder" v-if="enableAutoScan" v-model="cronExpression" @input="updatedCron" />
<div v-if="enableAutoScan">
<widgets-cron-expression-builder ref="cronExpressionBuilder" v-model="cronExpression" @input="updatedCron" />
<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>
</div>
@ -23,10 +32,22 @@ export default {
data() {
return {
cronExpression: null,
enableAutoScan: false
enableAutoScan: 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
@ -47,9 +68,25 @@ export default {
}
})
},
updateMatchAfterScan(value) {
this.$emit('update', {
settings: {
matchAfterScan: value
}
})
},
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() {