From b14d55c9220328492c8e0618bf9fb95b8273df24 Mon Sep 17 00:00:00 2001
From: whatdoineed2do/Ray
Date: Tue, 7 Apr 2020 18:39:00 +0100
Subject: [PATCH] [web-src] search page can allow serach by smartpl
---
web-src/src/pages/PageSearch.vue | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/web-src/src/pages/PageSearch.vue b/web-src/src/pages/PageSearch.vue
index 4f8b51b7..54317a9b 100644
--- a/web-src/src/pages/PageSearch.vue
+++ b/web-src/src/pages/PageSearch.vue
@@ -15,6 +15,12 @@
+
+
+
@@ -148,6 +154,7 @@ export default {
data () {
return {
search_query: '',
+ smart_query: false,
tracks: { items: [], total: 0 },
artists: { items: [], total: 0 },
albums: { items: [], total: 0 },
@@ -211,7 +218,8 @@ export default {
var searchParams = {
'type': route.query.type,
- 'query': route.query.query,
+ 'query': this.smart_query ? undefined : route.query.query,
+ 'expression': this.smart_query ? route.query.query : undefined,
'media_kind': 'music'
}
@@ -226,7 +234,7 @@ export default {
this.albums = data.albums ? data.albums : { items: [], total: 0 }
this.playlists = data.playlists ? data.playlists : { items: [], total: 0 }
- this.$store.commit(types.ADD_RECENT_SEARCH, searchParams.query)
+ this.$store.commit(types.ADD_RECENT_SEARCH, route.query.query)
})
},