Skip to content

Commit

Permalink
added the 'play now' option to the genre/tagview | fixes issue nukeop…
Browse files Browse the repository at this point in the history
…#200 (nukeop#216)

* added 'play now' button to top charts

* added 'play button' to top charts

* fixed issues with pull request!

* added a 'play now' button to the genre/tagview section

* Update index.js
  • Loading branch information
WalkerFrederick authored and nukeop committed Jan 29, 2019
1 parent dfcb667 commit 3bf81f2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
19 changes: 19 additions & 0 deletions app/components/TagView/TagTopTracks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,25 @@ class TagTopTracks extends React.Component {
>
<FontAwesome name='plus' /> Add to queue
</a>
<a
href='#'
className='add_button'
onClick={() => {
this.props.clearQueue();
addToQueue(musicSources, {
artist: track.artist.name,
name: track.name,
thumbnail: track.image[1]['#text']
});
this.props.selectSong(0);
this.props.startPlayback();
this.props.startPlayback();

}}
aria-label='Play Song Right Now'
>
<FontAwesome name='play' /> Play now
</a>
</ContextPopup>
);
}
Expand Down
5 changes: 5 additions & 0 deletions app/components/TagView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ class TagView extends React.Component {
tracks={topTracks}
addToQueue={addToQueue}
musicSources={musicSources}
startPlayback={this.props.startPlayback}
clearQueue={this.props.clearQueue}
selectSong={this.props.selectSong}


/>
);
}
Expand Down
6 changes: 5 additions & 1 deletion app/containers/TagViewContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { bindActionCreators } from 'redux';
import * as Actions from '../../actions';
import * as TagActions from '../../actions/tag';
import * as QueueActions from '../../actions/queue';
import * as PlayerActions from '../../actions/player';

import TagView from '../../components/TagView';

Expand All @@ -25,12 +26,15 @@ class TagViewContainer extends React.Component {
return (
<TagView
loadTagInfo={actions.loadTagInfo}
addToQueue={actions.addToQueue}
artistInfoSearchByName={actions.artistInfoSearchByName}
history={history}
tag={match.params.tagName}
tags={tags}
musicSources={musicSources}
addToQueue={actions.addToQueue}
startPlayback={actions.startPlayback}
clearQueue={actions.clearQueue}
selectSong={actions.selectSong}
/>
);
}
Expand Down

0 comments on commit 3bf81f2

Please sign in to comment.