Only blocking key events when they're our target keys; Patching tracklist hotkeys
This commit is contained in:
@ -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',
|
||||
|
||||
@ -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+"'");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user