URI handling and encoding

This commit is contained in:
James Barnsley
2019-01-17 15:54:04 +13:00
parent d5c946456f
commit 9144a194e1
6 changed files with 1950 additions and 1980 deletions

View File

@ -26,11 +26,11 @@ class LibraryBrowse extends React.Component{
}
componentDidMount(){
this.loadDirectory()
this.loadDirectory();
this.props.uiActions.setWindowTitle("Browse");
}
componentWillReceiveProps(nextProps){
this.props.uiActions.setWindowTitle("Browse");
// mopidy goes online
if (!this.props.mopidy_connected && nextProps.mopidy_connected){
@ -40,11 +40,7 @@ class LibraryBrowse extends React.Component{
loadDirectory(props = this.props){
if (props.mopidy_connected){
var uri = null
if (props.uri !== undefined){
uri = props.uri;
}
this.props.mopidyActions.getDirectory(uri);
this.props.mopidyActions.getDirectory(null);
}
}
@ -120,7 +116,8 @@ class LibraryBrowse extends React.Component{
<GridItem
item={item}
key={index}
type="category"
link={item.link}
type="browse"
/>
)
}