Context menu on related artists; Starting breadcrumb for Browse
This commit is contained in:
@ -13,6 +13,7 @@ import {
|
||||
formatImages,
|
||||
formatTrack,
|
||||
formatTracks,
|
||||
formatSimpleObject,
|
||||
getTrackIcon,
|
||||
} from '../../util/format';
|
||||
import {
|
||||
@ -2399,6 +2400,17 @@ const MopidyMiddleware = (function () {
|
||||
type: 'MOPIDY_DIRECTORY_FLUSH',
|
||||
});
|
||||
|
||||
if (action.uri) {
|
||||
request(socket, store, 'library.lookup', { uris: [action.uri] })
|
||||
.then((response) => {
|
||||
if (!response[action.uri] || !response[action.uri].length) return;
|
||||
store.dispatch({
|
||||
type: 'MOPIDY_DIRECTORY_LOADED',
|
||||
directory: formatSimpleObject(response[action.uri][0]),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
request(socket, store, 'library.browse', { uri: action.uri })
|
||||
.then((response) => {
|
||||
const tracks_uris = [];
|
||||
|
||||
Reference in New Issue
Block a user