Only blocking key events when they're our target keys; Patching tracklist hotkeys

This commit is contained in:
James Barnsley
2019-05-05 11:06:17 +12:00
parent ebf36191fd
commit 7407008607
10 changed files with 139 additions and 52 deletions

View File

@ -55,9 +55,13 @@ export function startSearch(search_type, query, only_mopidy = false){
export function handleException(message, data = {}, description = null, show_notification = true){
if (!message && data.message){
message = data.message;
} else if (!message && data.error.message){
message = data.error.message;
}
if (!description && data.description){
description = data.description;
} else if (!description && data.error.description){
description = data.error.description;
}
return {
type: 'HANDLE_EXCEPTION',

View File

@ -177,6 +177,12 @@ export function getMe(){
me: response.user
});
}
},
error => {
dispatch(coreActions.handleException(
"Could not get your LastFM profile",
error
));
}
)
}
@ -223,6 +229,9 @@ export function getTrack(uri){
);
dispatch(coreActions.trackLoaded(merged_track));
}
},
error => {
console.info("LastFM: No results for track '"+track_name+"' by '"+artist_name+"'");
}
)
}
@ -254,6 +263,9 @@ export function getArtist(uri, artist, mbid = false){
dispatch(coreActions.artistLoaded(artist));
}
},
error => {
console.info("LastFM: No results for artist '"+artist+"'");
}
)
}
@ -294,6 +306,9 @@ export function getAlbum(uri, artist, album, mbid = false){
dispatch(coreActions.albumLoaded(album));
}
},
error => {
console.info("LastFM: No results for album '"+album+"'");
}
);
}