Wrapping mopidy service and connecting store

This commit is contained in:
James Barnsley
2016-10-03 16:55:33 +13:00
parent e0307f69e6
commit 12f07637ee
11 changed files with 106 additions and 61 deletions

View File

@ -18,13 +18,9 @@ class NowPlaying extends React.Component{
// on render
componentDidMount(){
var self = this;
Services.get('services.mopidy')
.then( function(MopidyService){
MopidyService.connection.tracklist.getTlTracks()
.then( function(tracks){
self.setState({ tracks : tracks });
});
MopidyService.getCurrentTracklist();
})
}