From bf7bc9a9bc7a0a3df01642da8f526d86c87ad405 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Thu, 22 Feb 2018 23:35:40 +0100 Subject: [PATCH] Display current request under import and send request to API --- .../components/library/import/ImportMixin.vue | 6 ++++- front/src/components/library/import/Main.vue | 25 ++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/front/src/components/library/import/ImportMixin.vue b/front/src/components/library/import/ImportMixin.vue index 33c6193bd..8b0757dcc 100644 --- a/front/src/components/library/import/ImportMixin.vue +++ b/front/src/components/library/import/ImportMixin.vue @@ -13,7 +13,8 @@ export default { defaultEnabled: {type: Boolean, default: true}, backends: {type: Array}, defaultBackendId: {type: String}, - queryTemplate: {type: String, default: '$artist $title'} + queryTemplate: {type: String, default: '$artist $title'}, + request: {type: Object, required: false} }, data () { return { @@ -32,6 +33,9 @@ export default { this.isImporting = true let url = 'submit/' + self.importType + '/' let payload = self.importData + if (this.request) { + payload.importRequest = this.request.id + } axios.post(url, payload).then((response) => { logger.default.info('launched import for', self.type, self.metadata.id) self.isImporting = false diff --git a/front/src/components/library/import/Main.vue b/front/src/components/library/import/Main.vue index 75017c1e6..0a1cc6df9 100644 --- a/front/src/components/library/import/Main.vue +++ b/front/src/components/library/import/Main.vue @@ -92,6 +92,7 @@ -
+
+

Music request

+

This import will be associated with the music request below. After the import is finished, the request will be marked as fulfilled.

+
@@ -121,6 +125,7 @@