Local playlists and uri encoding

This commit is contained in:
James Barnsley
2019-01-30 21:30:26 +13:00
parent fb9cea5cde
commit c370ae1699
7 changed files with 41 additions and 7 deletions

View File

@ -204,7 +204,12 @@ class EditPlaylist extends React.Component{
}
const mapStateToProps = (state, ownProps) => {
// Decode the URI, and then re-encode all the spaces
// This is needed as Mopidy encodes spaces in playlist URIs (but not other characters)
var uri = decodeURIComponent(ownProps.match.params.uri);
uri = uri.replace(/\s/g, '%20');
return {
uri: uri,
mopidy_connected: state.mopidy.connected,