Playlist editability with new playlist format
This commit is contained in:
@ -673,7 +673,7 @@ const CoreMiddleware = (function(){
|
||||
|
||||
case 'spotify':
|
||||
if (store.getState().spotify.authorization && store.getState().spotify.me){
|
||||
playlist.can_edit = (helpers.getFromUri('playlistowner',playlist.uri) == store.getState().spotify.me.id)
|
||||
playlist.can_edit = (playlist.owner.id == store.getState().spotify.me.id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ const localstorageMiddleware = (function(){
|
||||
helpers.setStorage(
|
||||
'spotify',
|
||||
{
|
||||
me: action.data
|
||||
me: action.me
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
@ -1730,7 +1730,6 @@ const MopidyMiddleware = (function(){
|
||||
var uris_to_load = uris.splice(0,50);
|
||||
|
||||
if (uris_to_load.length > 0){
|
||||
console.log(uris.length);
|
||||
store.dispatch(uiActions.updateProcess(
|
||||
'MOPIDY_LIBRARY_ALBUMS_PROCESSOR',
|
||||
'Loading '+uris.length+' local albums',
|
||||
|
||||
@ -1491,7 +1491,6 @@ export function getPlaylist(uri){
|
||||
helpers.formatPlaylist(response),
|
||||
{
|
||||
is_completely_loaded: true,
|
||||
can_edit: (getState().spotify.me && response.owner.id == getState().spotify.me.id),
|
||||
user_uri: response.owner.uri,
|
||||
tracks_uris: helpers.arrayOf('uri', tracks),
|
||||
tracks_more: response.tracks.next,
|
||||
@ -1500,7 +1499,7 @@ export function getPlaylist(uri){
|
||||
}
|
||||
)
|
||||
|
||||
//dispatch(coreActions.userLoaded(helpers.formatUser(response.owner)));
|
||||
dispatch(coreActions.userLoaded(helpers.formatUser(response.owner)));
|
||||
dispatch(coreActions.tracksLoaded(tracks));
|
||||
dispatch(coreActions.playlistLoaded(playlist));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user