From 46b9c6a1c8a4ed360af7f98792c1d28a0770830e Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Wed, 28 Feb 2018 19:03:12 +0100 Subject: [PATCH 1/4] Added "mix" to the list of highlighted keywords in import --- front/src/components/library/import/TrackImport.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/front/src/components/library/import/TrackImport.vue b/front/src/components/library/import/TrackImport.vue index edd444d92..08ee72cbd 100644 --- a/front/src/components/library/import/TrackImport.vue +++ b/front/src/components/library/import/TrackImport.vue @@ -100,7 +100,8 @@ export default Vue.extend({ warnings: [ 'live', 'full', - 'cover' + 'cover', + 'mix' ], time } From 799cc0196432d7a7518186e5f4616be14fa7ceef Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Wed, 28 Feb 2018 19:03:40 +0100 Subject: [PATCH 2/4] Search by track on import is back --- .../components/library/import/TrackImport.vue | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/front/src/components/library/import/TrackImport.vue b/front/src/components/library/import/TrackImport.vue index 08ee72cbd..f6adc5afb 100644 --- a/front/src/components/library/import/TrackImport.vue +++ b/front/src/components/library/import/TrackImport.vue @@ -103,6 +103,7 @@ export default Vue.extend({ 'cover', 'mix' ], + customQuery: '', time } }, @@ -115,7 +116,7 @@ export default Vue.extend({ $('.ui.checkbox').checkbox() }, methods: { - search () { + search: function () { let self = this this.isLoading = true let url = 'providers/' + this.currentBackendId + '/search/' @@ -145,17 +146,25 @@ export default Vue.extend({ source: this.importedUrl } }, - query () { - let queryMapping = [ - ['artist', this.releaseMetadata['artist-credit'][0]['artist']['name']], - ['album', this.releaseMetadata['title']], - ['title', this.metadata['recording']['title']] - ] - let query = this.customQueryTemplate - queryMapping.forEach(e => { - query = query.split('$' + e[0]).join(e[1]) - }) - return query + query: { + get: function () { + if (this.customQuery.length > 0) { + return this.customQuery + } + let queryMapping = [ + ['artist', this.releaseMetadata['artist-credit'][0]['artist']['name']], + ['album', this.releaseMetadata['title']], + ['title', this.metadata['recording']['title']] + ] + let query = this.customQueryTemplate + queryMapping.forEach(e => { + query = query.split('$' + e[0]).join(e[1]) + }) + return query + }, + set: function (newValue) { + this.customQuery = newValue + } } }, watch: { From 7561f4dddf45db134eff685d97ac71d9134c1940 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Wed, 28 Feb 2018 19:21:06 +0100 Subject: [PATCH 3/4] Prettier file upload form --- front/src/components/library/import/FileUpload.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/front/src/components/library/import/FileUpload.vue b/front/src/components/library/import/FileUpload.vue index 1b90adc9d..35338c656 100644 --- a/front/src/components/library/import/FileUpload.vue +++ b/front/src/components/library/import/FileUpload.vue @@ -1,8 +1,8 @@