Implement interactive consolidation conflict resolution with merge and rename options

This commit is contained in:
Tiberiu Ichim 2026-02-17 15:48:28 +02:00
parent ca85e4af43
commit 86b036cb7c
7 changed files with 260 additions and 20 deletions

View file

@ -830,7 +830,19 @@ export default {
})
.catch((error) => {
console.error('Failed to consolidate', error)
this.$toast.error(error.response?.data || this.$strings.ToastConsolidateFailed || 'Consolidate failed')
if (error.response?.status === 409) {
const data = error.response.data
const author = this.mediaMetadata.authorName?.split(',')[0]?.trim() || 'Unknown Author'
const title = this.mediaMetadata.title || 'Unknown Title'
this.$eventBus.$emit('show-consolidation-conflict', {
item: this._libraryItem,
path: data.path,
folderName: this.$getConsolidatedFolderName(author, title),
existingLibraryItemId: data.existingLibraryItemId
})
} else {
this.$toast.error(error.response?.data?.error || error.response?.data || this.$strings.ToastConsolidateFailed || 'Consolidate failed')
}
})
.finally(() => {
this.processing = false