From eba37c46cb65a1c240d117bb11e1462d95d986ad Mon Sep 17 00:00:00 2001 From: advplyr Date: Wed, 18 May 2022 16:36:54 -0500 Subject: [PATCH] Update:Confirmation when clicking force re-scan #591 --- .../components/tables/library/LibraryItem.vue | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/client/components/tables/library/LibraryItem.vue b/client/components/tables/library/LibraryItem.vue index 8be8c8ba..e8b24446 100644 --- a/client/components/tables/library/LibraryItem.vue +++ b/client/components/tables/library/LibraryItem.vue @@ -84,15 +84,17 @@ export default { }) }, forceScan() { - this.$store - .dispatch('libraries/requestLibraryScan', { libraryId: this.library.id, force: 1 }) - .then(() => { - this.$toast.success('Library scan started') - }) - .catch((error) => { - console.error('Failed to start scan', error) - this.$toast.error('Failed to start scan') - }) + if (confirm(`Force Re-Scan will scan all files again like a fresh scan. Audio file ID3 tags, OPF files, and text files will be probed/parsed to be used for the library item.\n\nAre you sure you want to force re-scan?`)) { + this.$store + .dispatch('libraries/requestLibraryScan', { libraryId: this.library.id, force: 1 }) + .then(() => { + this.$toast.success('Library scan started') + }) + .catch((error) => { + console.error('Failed to start scan', error) + this.$toast.error('Failed to start scan') + }) + } }, deleteClick() { if (this.isMain) return