New data model edit tracks page, match, quick match, clean out old files

This commit is contained in:
advplyr
2022-03-13 19:34:31 -05:00
parent be1e1e7ba0
commit 7d66f1eec9
68 changed files with 354 additions and 1529 deletions
+11 -3
View File
@@ -84,14 +84,22 @@ export default {
},
methods: {
quickMatch() {
if (this.quickMatching) return
if (!this.$refs.itemDetailsEdit) return
var { title, author } = this.$refs.itemDetailsEdit.getTitleAndAuthorName()
if (!title) {
this.$toast.error('Must have a title for quick match')
return
}
this.quickMatching = true
var matchOptions = {
provider: this.libraryProvider,
title: this.details.title,
author: this.details.author !== this.book.author ? this.details.author : null
title: title || null,
author: author || null
}
this.$axios
.$post(`/api/books/${this.libraryItemId}/match`, matchOptions)
.$post(`/api/items/${this.libraryItemId}/match`, matchOptions)
.then((res) => {
this.quickMatching = false
if (res.warning) {