diff --git a/platypush/backend/http/static/js/plugins/music.mpd/index.js b/platypush/backend/http/static/js/plugins/music.mpd/index.js index eb930c60f8..0b4e0665d1 100644 --- a/platypush/backend/http/static/js/plugins/music.mpd/index.js +++ b/platypush/backend/http/static/js/plugins/music.mpd/index.js @@ -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}; } diff --git a/platypush/backend/http/static/js/plugins/music.mpd/search.js b/platypush/backend/http/static/js/plugins/music.mpd/search.js index 9ec38c4e10..dcf8a78934 100644 --- a/platypush/backend/http/static/js/plugins/music.mpd/search.js +++ b/platypush/backend/http/static/js/plugins/music.mpd/search.js @@ -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});