{ this.renderArtwork(image) }
- {this.props.current_track ? {this.props.current_track.name} : -}
+ {this.props.current_track ? {this.props.current_track.name} : -}
{this.props.current_track ?
:
}
@@ -154,7 +159,7 @@ const mapStateToProps = (state, ownProps) => {
radio: state.core.radio,
radio_enabled: (state.core.radio && state.core.radio.enabled ? true : false),
current_tracklist: state.core.current_tracklist,
- current_track: (state.core.current_track !== undefined && state.core.tracks !== undefined && state.core.tracks[state.core.current_track.uri] !== undefined ? state.core.tracks[state.core.current_track.uri] : null)
+ current_track: (state.core.current_track !== undefined && state.core.tracks !== undefined && state.core.tracks[state.core.current_track] !== undefined ? state.core.tracks[state.core.current_track] : null)
}
}
diff --git a/src/js/views/library/LibraryBrowse.js b/src/js/views/library/LibraryBrowse.js
index a7d61ed2..46b22d34 100755
--- a/src/js/views/library/LibraryBrowse.js
+++ b/src/js/views/library/LibraryBrowse.js
@@ -55,31 +55,11 @@ class LibraryBrowse extends React.Component{
if (directory[i].type && directory[i].type == 'track'){
tracks.push(directory[i] )
} else {
- var uri = directory[i].uri
-
- // If we've navigated to a handled asset type, use our standard views
- switch (helpers.uriType(uri)){
- case 'album':
- uri = global.baseURL+'album/'+uri
- break
-
- case 'artist':
- uri = global.baseURL+'artist/'+uri
- break
-
- case 'playlist':
- uri = global.baseURL+'playlist/'+uri
- break
-
- default:
- uri = global.baseURL+"library/browse/"+uri.replace(/[/]/g,'%2F')
- }
-
folders.push(Object.assign(
{},
directory[i],
{
- uri: uri
+ uri: directory[i].uri
}
))
}
@@ -91,119 +71,123 @@ class LibraryBrowse extends React.Component{
}
}
- render(){
- if (typeof(this.props.params.uri) !== 'undefined' && this.props.params.uri){
-
- var title = 'Browse';
- var uri_exploded = this.props.params.uri.split(':');
- if (uri_exploded.length > 0){
- title = uri_exploded[0];
- title = title.charAt(0).toUpperCase() + title.slice(1);
- }
+ renderDirectory(){
+ var title = 'Browse';
+ var uri_exploded = this.props.params.uri.split(':');
+ if (uri_exploded.length > 0){
+ title = uri_exploded[0];
+ title = title.charAt(0).toUpperCase() + title.slice(1);
+ }
- var options = null;
- if (this.props.params.uri != 'local:directory'){
- options = (
-