Changed mpd filter to dict on the frontend as well
This commit is contained in:
parent
42c5bbe0e4
commit
535b2ec083
2 changed files with 5 additions and 5 deletions
|
@ -761,7 +761,7 @@ Vue.component('music-mpd', {
|
|||
var info = item;
|
||||
|
||||
if (typeof(item) === 'string') {
|
||||
var items = await request('music.mpd.search', {filter: ['file', info]});
|
||||
var items = await request('music.mpd.search', {filter: {file: info}});
|
||||
item = items.length ? items[0] : {file: info};
|
||||
}
|
||||
|
||||
|
|
|
@ -121,13 +121,13 @@ Vue.component('music-mpd-search', {
|
|||
|
||||
methods: {
|
||||
search: async function() {
|
||||
const filter = Object.keys(this.query).reduce((items, key) => {
|
||||
const filter = Object.keys(this.query).reduce((query, key) => {
|
||||
if (this.query[key].length) {
|
||||
items.push(key, this.query[key]);
|
||||
query[key] = this.query[key];
|
||||
}
|
||||
|
||||
return items;
|
||||
}, []);
|
||||
return query;
|
||||
}, {});
|
||||
|
||||
this.results = [];
|
||||
var results = await request('music.mpd.search', {filter: filter});
|
||||
|
|
Loading…
Reference in a new issue