Revamping radio notifications; Radio current track
This commit is contained in:
@ -362,6 +362,7 @@ export function getFeaturedPlaylists(){
|
||||
{},
|
||||
response.playlists.items[i],
|
||||
{
|
||||
is_completely_loaded: false,
|
||||
can_edit: (getState().spotify.me && response.playlists.items[i].owner.id == getState().spotify.me.id),
|
||||
tracks_total: response.playlists.items[i].tracks.total
|
||||
}
|
||||
@ -1543,6 +1544,7 @@ export function getPlaylist(uri){
|
||||
{},
|
||||
response,
|
||||
{
|
||||
is_completely_loaded: true,
|
||||
can_edit: (getState().spotify.me && response.owner.id == getState().spotify.me.id),
|
||||
tracks: helpers.formatTracks(response.tracks.items),
|
||||
tracks_more: response.tracks.next,
|
||||
|
||||
@ -17,23 +17,6 @@ const SpotifyMiddleware = (function(){
|
||||
|
||||
switch(action.type){
|
||||
|
||||
case 'SPOTIFY_CONNECTED':
|
||||
var hashed_username = null
|
||||
if (store.getState().spotify.me){
|
||||
hashed_username = md5(store.getState().spotify.me.id);
|
||||
ReactGA.set({userId: hashed_username});
|
||||
}
|
||||
ReactGA.event({category: 'Spotify', action: 'Connected', label: hashed_username})
|
||||
|
||||
// TODO: remove this so we don't tap out our API limits before we even get started
|
||||
// Perhaps fire this on demand? Context menu, playlists loading or AddToPlaylistModal
|
||||
if (store.getState().spotify_authorized){
|
||||
store.dispatch(spotifyActions.getAllLibraryPlaylists())
|
||||
}
|
||||
|
||||
next(action);
|
||||
break
|
||||
|
||||
case 'SPOTIFY_AUTHORIZATION_GRANTED':
|
||||
ReactGA.event({category: 'Spotify', action: 'Authorization granted'});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user