mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 07:05:57 -05:00
Merge pull request #1133 from chme/web_next
[web] Fix switching to Spotify search with empty query
This commit is contained in:
commit
17e7df84fb
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "forked-daapd-web",
|
||||
"version": "0.8.2",
|
||||
"version": "0.8.3",
|
||||
"private": true,
|
||||
"description": "forked-daapd web interface",
|
||||
"author": "chme <christian.meffert@googlemail.com>",
|
||||
|
@ -34,39 +34,34 @@ export default {
|
||||
computed: {
|
||||
spotify_enabled () {
|
||||
return this.$store.state.spotify.webapi_token_valid
|
||||
},
|
||||
|
||||
route_query: function () {
|
||||
if (!this.query) {
|
||||
return null
|
||||
}
|
||||
|
||||
return {
|
||||
type: 'track,artist,album,playlist,audiobook,podcast',
|
||||
query: this.query,
|
||||
limit: 3,
|
||||
offset: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
search_library: function () {
|
||||
if (!this.query) {
|
||||
return
|
||||
}
|
||||
|
||||
this.$router.push({
|
||||
path: '/search/library',
|
||||
query: {
|
||||
type: 'track,artist,album,playlist,audiobook,podcast',
|
||||
query: this.query,
|
||||
limit: 3,
|
||||
offset: 0
|
||||
}
|
||||
query: this.route_query
|
||||
})
|
||||
},
|
||||
|
||||
search_spotify: function () {
|
||||
if (!this.query) {
|
||||
return
|
||||
}
|
||||
|
||||
this.$router.push({
|
||||
path: '/search/spotify',
|
||||
query: {
|
||||
type: 'track,artist,album,playlist,audiobook,podcast',
|
||||
query: this.query,
|
||||
limit: 3,
|
||||
offset: 0
|
||||
}
|
||||
query: this.route_query
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user