import React, { PropTypes } from 'react' import { connect } from 'react-redux' import { hashHistory } from 'react-router' import { bindActionCreators } from 'redux' import FontAwesome from 'react-fontawesome' import TrackList from '../components/TrackList' import Track from '../components/Track' import Dater from '../components/Dater' import SidebarToggleButton from '../components/SidebarToggleButton' import FullPlayer from '../components/FullPlayer' import ArtistSentence from '../components/ArtistSentence' import Header from '../components/Header' import * as uiActions from '../services/ui/actions' import * as pusherActions from '../services/pusher/actions' import * as spotifyActions from '../services/spotify/actions' import * as mopidyActions from '../services/mopidy/actions' class Queue extends React.Component{ constructor(props) { super(props); } removeTracks( tracks_indexes ){ var tlids = []; for( var i = 0; i < tracks_indexes.length; i++ ){ tlids.push( this.props.current_tracklist[tracks_indexes[i]].tlid ) } this.props.mopidyActions.removeTracks( tlids ) } playTrack( track ){ this.props.mopidyActions.changeTrack( track.tlid ) } playTracks( tracks ){ this.props.mopidyActions.changeTrack( tracks[0].tlid ) } reorderTracks( indexes, index ){ this.props.mopidyActions.reorderTracklist( indexes, index ) } renderQueueStats(){ var total_time = 0 return (