Local directory and hashHistory compatibility
This commit is contained in:
@ -661,7 +661,7 @@ const MopidyMiddleware = (function(){
|
||||
* ======================================================================================
|
||||
**/
|
||||
|
||||
case 'MOPIDY_DIRECTORY':
|
||||
case 'MOPIDY_GET_DIRECTORY':
|
||||
store.dispatch({ type: 'MOPIDY_DIRECTORY_LOADED', data: false });
|
||||
instruct( socket, store, 'library.browse', action.data )
|
||||
.then( response => {
|
||||
|
||||
@ -72,21 +72,6 @@ export default function reducer(mopidy = {}, action){
|
||||
directory: action.data
|
||||
});
|
||||
|
||||
case 'MOPIDY_PLAYLIST_LOADED':
|
||||
return Object.assign({}, mopidy, {
|
||||
playlist: action.data
|
||||
});
|
||||
|
||||
case 'MOPIDY_ARTISTS_LOADED':
|
||||
return Object.assign({}, mopidy, {
|
||||
artists: action.data
|
||||
});
|
||||
|
||||
case 'MOPIDY_ALBUMS_LOADED':
|
||||
return Object.assign({}, mopidy, {
|
||||
albums: action.data
|
||||
});
|
||||
|
||||
default:
|
||||
return mopidy
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ class LibraryLocalDirectory extends React.Component{
|
||||
|
||||
loadDirectory( props = this.props ){
|
||||
if( props.mopidy_connected ){
|
||||
this.props.mopidyActions.getDirectory( props.params.uri );
|
||||
this.props.mopidyActions.getDirectory( props.params.uri.replace('|','?') );
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,7 +50,13 @@ class LibraryLocalDirectory extends React.Component{
|
||||
if (directory[i].type && directory[i].type == 'track') {
|
||||
tracks.push( directory[i] )
|
||||
} else {
|
||||
folders.push( directory[i] )
|
||||
folders.push(Object.assign(
|
||||
{},
|
||||
directory[i],
|
||||
{
|
||||
uri: directory[i].uri.replace('?','|')
|
||||
}
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user