Bringing all tracks into core index; Need to refactor loading all assets
This commit is contained in:
@ -15,7 +15,10 @@ const sendRequest = (dispatch, getState, params, signed = false) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
var loader_key = helpers.generateGuid();
|
||||
dispatch(uiActions.startLoading(loader_key, 'lastfm_'+params));
|
||||
var method = params.substring(params.indexOf("method=")+7, params.length);
|
||||
method = method.substring(0, method.indexOf("&"));
|
||||
|
||||
dispatch(uiActions.startLoading(loader_key, 'lastfm_'+method));
|
||||
|
||||
var config = {
|
||||
method: 'GET',
|
||||
@ -83,8 +86,11 @@ const sendSignedRequest = (dispatch, getState, params) => {
|
||||
});
|
||||
}
|
||||
|
||||
var loader_key = helpers.generateGuid()
|
||||
dispatch(uiActions.startLoading(loader_key, 'lastfm_'+params));
|
||||
var loader_key = helpers.generateGuid();
|
||||
var method = params.substring(params.indexOf("method=")+7, params.length);
|
||||
method = method.substring(0, method.indexOf("&"));
|
||||
|
||||
dispatch(uiActions.startLoading(loader_key, 'lastfm_'+method));
|
||||
|
||||
params += "&sk="+getState().lastfm.session.key;
|
||||
|
||||
|
||||
@ -32,15 +32,6 @@ const LastfmMiddleware = (function(){
|
||||
next(action);
|
||||
break;
|
||||
|
||||
case 'MOPIDY_CURRENTTLTRACK':
|
||||
if (action.data && action.data.track){
|
||||
if (state.lastfm.session){
|
||||
store.dispatch(lastfmActions.scrobble(action.data.track));
|
||||
}
|
||||
}
|
||||
next(action);
|
||||
break;
|
||||
|
||||
|
||||
// This action is irrelevant to us, pass it on to the next middleware
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user