Categories moved to spotify, formatted images

This commit is contained in:
James Barnsley
2018-09-10 22:08:29 +12:00
parent 571d957b3f
commit cc1dfee7d1
14 changed files with 394 additions and 343 deletions

View File

@ -602,8 +602,8 @@ const CoreMiddleware = (function(){
var artists_index = Object.assign({}, core.artists);
var artists_loaded = [];
var tracks_loaded = [];
action.artists.forEach(raw_artist => {
for (var raw_artist of action.artists){
var artist = helpers.formatArtist(raw_artist);
// Already have an artist in the index
@ -628,7 +628,7 @@ const CoreMiddleware = (function(){
}
artists_loaded.push(artist);
});
};
action.artists = artists_loaded;
@ -736,10 +736,6 @@ const CoreMiddleware = (function(){
var records = action.records_data;
}
if (action.records_type == 'track'){
records = helpers.formatTracks(records);
}
var records_type_plural = action.records_type+'s';
var records_index = Object.assign({});
var records_uris = helpers.arrayOf('uri', records);