Searching; Source icon on TrackList

This commit is contained in:
James Barnsley
2016-11-06 18:29:49 +13:00
parent b55bec8494
commit 5aec62a296
14 changed files with 189 additions and 46 deletions

View File

@ -162,3 +162,19 @@ export function getAlbums(){
}
}
/**
* Other general actions
**/
export function getSearchResults(query, fields = ['any'], backends = null){
var queryObj = {};
for( var i = 0; i < fields.length; i++ ){
queryObj[fields[i]] = [query];
}
return {
type: 'MOPIDY_INSTRUCT',
call: 'library.search',
value: { query: queryObj, uris: backends }
}
}