Library albums release date and track count (fixes #30)
This commit is contained in:
@ -244,8 +244,8 @@ const SpotifyMiddleware = (function(){
|
||||
{
|
||||
added_at: action.data.items[i].added_at,
|
||||
tracks: action.data.items[i].album.tracks.items,
|
||||
tracks_next: action.data.items[i].album.tracks.tracks_next,
|
||||
tracks_total: action.data.items[i].album.tracks.tracks_total
|
||||
tracks_more: action.data.items[i].album.tracks.next,
|
||||
tracks_total: action.data.items[i].album.tracks.total
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@ -146,7 +146,7 @@ export default function reducer(ui = {}, action){
|
||||
|
||||
for (var i = 0; i < action.albums.length; i++){
|
||||
var album = action.albums[i]
|
||||
if (typeof(albums[album.uri]) !== 'undefined'){
|
||||
if (albums[album.uri]){
|
||||
artist = Object.assign({}, albums[album.uri], album)
|
||||
}
|
||||
albums[album.uri] = album
|
||||
|
||||
@ -38,12 +38,12 @@ class LibraryAlbums extends React.Component{
|
||||
if( this.props.view == 'list' ){
|
||||
var columns = [
|
||||
{
|
||||
width: 35,
|
||||
width: 30,
|
||||
label: 'Name',
|
||||
name: 'name'
|
||||
},
|
||||
{
|
||||
width: 35,
|
||||
width: 30,
|
||||
label: 'Artists',
|
||||
name: 'artists'
|
||||
},
|
||||
@ -54,8 +54,13 @@ class LibraryAlbums extends React.Component{
|
||||
},
|
||||
{
|
||||
width: 15,
|
||||
label: 'Released',
|
||||
name: 'release_date'
|
||||
},
|
||||
{
|
||||
width: 10,
|
||||
label: 'Tracks',
|
||||
name: 'tracks.total'
|
||||
name: 'tracks_total'
|
||||
}
|
||||
]
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user