mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
Implement interactive consolidation conflict resolution with merge and rename options
This commit is contained in:
parent
ca85e4af43
commit
86b036cb7c
7 changed files with 260 additions and 20 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue