From aab23b7ec3902639521c90f5528dba475ead6122 Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Sun, 10 Sep 2017 19:56:44 +1200 Subject: [PATCH] Play as universal primary action for artists, related to #32 --- src/js/views/Artist.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/js/views/Artist.js b/src/js/views/Artist.js index 106158e3..726cb91f 100755 --- a/src/js/views/Artist.js +++ b/src/js/views/Artist.js @@ -197,8 +197,12 @@ class Artist extends React.Component{ } if (this.props.artist){ - var can_play_radio = (scheme == 'spotify') - var can_follow = (scheme == 'spotify') + var is_spotify = (scheme == 'spotify') + if (is_spotify){ + var uris_to_play = helpers.arrayOf('uri',this.props.artist.tracks) + } else { + var uris_to_play = this.props.artist.albums_uris + } return (
@@ -212,8 +216,8 @@ class Artist extends React.Component{

{this.props.artist ? this.props.artist.name : null}

- { can_play_radio ? : } - { can_follow ? : null} + + {is_spotify ? : null} {this.props.slim_mode ? null : this.handleContextMenu(e)} />}
{ this.renderSubViewMenu() }