Correct base64 encoding; Typo for outputs control
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -77,7 +77,7 @@
|
||||
|
||||
// Release details
|
||||
// These are automatically injected to built HTML
|
||||
var build = "1530743614";
|
||||
var build = "1530872793";
|
||||
var version = "3.22.0";
|
||||
|
||||
// Construct the script tag
|
||||
|
||||
@ -111,7 +111,7 @@ class OutputControl extends React.Component{
|
||||
} else {
|
||||
|
||||
// No customisable outputs
|
||||
if (!this.props.http_streaming_enabled && !this.props.snacast_enabled){
|
||||
if (!this.props.http_streaming_enabled && !this.props.snapcast_enabled){
|
||||
return (
|
||||
<span className="output-control disabled">
|
||||
<a className="control speakers"><Icon name="speaker" /></a>
|
||||
@ -133,7 +133,7 @@ const mapStateToProps = (state, ownProps) => {
|
||||
http_streaming_enabled: state.core.http_streaming_enabled,
|
||||
http_streaming_volume: state.core.http_streaming_volume,
|
||||
http_streaming_mute: state.core.http_streaming_mute,
|
||||
snapcast_enabled: state.pusher.config.snapcast_enabled,
|
||||
snapcast_enabled: (state.pusher.config ? state.pusher.config.snapcast_enabled : null),
|
||||
pusher_connected: state.pusher.connected,
|
||||
snapcast_clients: state.pusher.snapcast_clients
|
||||
}
|
||||
|
||||
@ -36,7 +36,8 @@ export default class EditPlaylistModal extends React.Component{
|
||||
var file_reader = new FileReader();
|
||||
|
||||
file_reader.addEventListener("load", function(e){
|
||||
self.setState({image: e.target.result});
|
||||
var image_base64 = e.target.result.replace('data:image/jpeg;base64,','');
|
||||
self.setState({image: image_base64});
|
||||
});
|
||||
|
||||
file_reader.readAsDataURL(e.target.files[0]);
|
||||
|
||||
@ -1505,10 +1505,13 @@ export function savePlaylist(uri, name, description, is_public, is_collaborative
|
||||
response => {
|
||||
dispatch(uiActions.createNotification({content: 'Saved'}));
|
||||
|
||||
console.log({image: image});
|
||||
|
||||
// Save the image
|
||||
if (image){
|
||||
sendRequest(dispatch, getState, 'users/'+ getState().spotify.me.id +'/playlists/'+ helpers.getFromUri('playlistid',uri)+'/image', 'PUT', image)
|
||||
sendRequest(dispatch, getState, 'users/'+ getState().spotify.me.id +'/playlists/'+ helpers.getFromUri('playlistid',uri)+'/images', 'PUT', image)
|
||||
.then(
|
||||
|
||||
response => {
|
||||
dispatch({
|
||||
type: 'PLAYLIST_UPDATED',
|
||||
@ -1517,8 +1520,7 @@ export function savePlaylist(uri, name, description, is_public, is_collaborative
|
||||
name: name,
|
||||
public: is_public,
|
||||
collaborative: is_collaborative,
|
||||
description: description,
|
||||
image: image
|
||||
description: description
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user