Tracks loader; Less invasive update notifications, fixes #325
This commit is contained in:
@ -158,7 +158,6 @@ export default function reducer(core = {}, action){
|
||||
**/
|
||||
|
||||
case 'PLAYLIST_TRACKS':
|
||||
console.log(action)
|
||||
var playlists = Object.assign({}, core.playlists)
|
||||
var playlist = Object.assign({}, playlists[action.key], { tracks_uris: action.tracks_uris })
|
||||
|
||||
|
||||
@ -1503,8 +1503,7 @@ const MopidyMiddleware = (function(){
|
||||
|
||||
request(socket, store, 'library.lookup', { uris: uris })
|
||||
.then(response => {
|
||||
console.log(response)
|
||||
for(var uri in response){
|
||||
for (var uri in response){
|
||||
if (response.hasOwnProperty(uri)){
|
||||
|
||||
var track = response[uri][0]
|
||||
|
||||
@ -90,7 +90,6 @@ const PusherMiddleware = (function(){
|
||||
store.dispatch(spotifyActions.tokenChanged(message.params.spotify_token));
|
||||
break;
|
||||
case 'spotify_authorization_received':
|
||||
console.log(message);
|
||||
store.dispatch(uiActions.createNotification({
|
||||
type: 'spotify-authorization-received',
|
||||
authorization: message.params.authorization,
|
||||
@ -230,10 +229,18 @@ const PusherMiddleware = (function(){
|
||||
}
|
||||
|
||||
store.dispatch(pusherActions.getConfig());
|
||||
store.dispatch(pusherActions.getVersion());
|
||||
store.dispatch(pusherActions.getRadio());
|
||||
store.dispatch(pusherActions.getQueueMetadata());
|
||||
|
||||
|
||||
// Give things a few moments to setup before we check for version.
|
||||
// This is because the server makes a GitHub request, which creates a [very] small delay
|
||||
// in subsequent requests.
|
||||
setTimeout(
|
||||
function(){
|
||||
store.dispatch(pusherActions.getVersion());
|
||||
},
|
||||
2000
|
||||
);
|
||||
next(action);
|
||||
break;
|
||||
|
||||
@ -546,10 +553,6 @@ const PusherMiddleware = (function(){
|
||||
if (store.getState().ui.allow_reporting){
|
||||
ReactGA.event({ category: 'Pusher', action: 'Version', label: action.version.current });
|
||||
}
|
||||
|
||||
if (action.version.upgrade_available){
|
||||
store.dispatch(uiActions.createNotification({content: 'Version '+action.version.latest+' is available. See settings to upgrade.'}));
|
||||
}
|
||||
next(action);
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user