Duplicate albums from new releases

This commit is contained in:
James Barnsley
2018-07-02 16:22:05 +12:00
parent 122f99d027
commit 58120a399e
8 changed files with 22845 additions and 20893 deletions

View File

@ -3293,7 +3293,7 @@ input[type="submit"] {
.field.sub-field { .field.sub-field {
padding: 0; } padding: 0; }
.field .description { .field .description {
display: inline-block; display: block;
padding: 6px 0 4px; padding: 6px 0 4px;
font-size: 12px; font-size: 12px;
opacity: 0.6; } opacity: 0.6; }

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -77,7 +77,7 @@
// Release details // Release details
// These are automatically injected to built HTML // These are automatically injected to built HTML
var build = "1530434196"; var build = "1530477679";
var version = "3.21.4"; var version = "3.21.4";
// Construct the script tag // Construct the script tag

View File

@ -72,12 +72,13 @@ export default function reducer(spotify = {}, action){
return Object.assign({}, spotify, { new_releases: action.data }); return Object.assign({}, spotify, { new_releases: action.data });
case 'SPOTIFY_NEW_RELEASES_LOADED_MORE': case 'SPOTIFY_NEW_RELEASES_LOADED_MORE':
console.log([ ...spotify.new_releases.items, ...action.data.albums.items]);
return Object.assign({}, spotify, { new_releases: { return Object.assign({}, spotify, { new_releases: {
href: action.data.albums.href, href: action.data.albums.href,
next: action.data.albums.next, next: action.data.albums.next,
previous: action.data.albums.previous, previous: action.data.albums.previous,
items: [ ...spotify.new_releases.items, ...action.data.albums.items] items: [ ...spotify.new_releases.items, ...action.data.albums.items]
}}) }});
case 'SPOTIFY_DISCOVER_LOADED': case 'SPOTIFY_DISCOVER_LOADED':
if (!action.data ){ if (!action.data ){

View File

@ -104,9 +104,15 @@ class DiscoverFeatured extends React.Component{
first_playlist = first_playlist[0] first_playlist = first_playlist[0]
} }
var options = (
<button className="no-hover" onClick={e => this.props.spotifyActions.getFeaturedPlaylists()}>
<Icon name="refresh" />Refresh
</button>
);
return ( return (
<div className="view discover-featured-view"> <div className="view discover-featured-view">
<Header className="overlay"> <Header className="overlay" options={options}>
<Icon name="star" type="material" /> <Icon name="star" type="material" />
Featured playlists Featured playlists
</Header> </Header>

View File

@ -122,9 +122,15 @@ class DiscoverNewReleases extends React.Component{
first_album = first_album[0] first_album = first_album[0]
} }
var options = (
<button className="no-hover" onClick={e => this.props.spotifyActions.getNewReleases()}>
<Icon name="refresh" />Refresh
</button>
);
return ( return (
<div className="view discover-new-releases-view"> <div className="view discover-new-releases-view">
<Header className="overlay"> <Header className="overlay" options={options}>
<Icon name="new_releases" type="material" /> <Icon name="new_releases" type="material" />
New releases New releases
</Header> </Header>

View File

@ -325,7 +325,7 @@ input[type="submit"] {
} }
.description { .description {
display: inline-block; display: block;
padding: 6px 0 4px; padding: 6px 0 4px;
font-size: 12px; font-size: 12px;
opacity: 0.6; opacity: 0.6;