Changed mpd filter to dict on the frontend as well

This commit is contained in:
Fabio Manganiello 2020-03-08 13:07:35 +01:00
parent 42c5bbe0e4
commit 535b2ec083
2 changed files with 5 additions and 5 deletions

View File

@ -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};
}

View File

@ -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});