Resumable processes for mopidy
This commit is contained in:
@ -351,8 +351,8 @@ const MopidyMiddleware = (function(){
|
||||
for (var i = 0; i < batches.length; i++){
|
||||
total_uris += batches[i].uris.length
|
||||
}
|
||||
var next_batches = batches.shift()
|
||||
store.dispatch(uiActions.updateProcess('MOPIDY_ENQUEUE_URIS_PROCESSOR', 'Adding '+total_uris+' URI(s)', {batches: next_batches}))
|
||||
batches.shift()
|
||||
store.dispatch(uiActions.updateProcess('MOPIDY_ENQUEUE_URIS_PROCESSOR', 'Adding '+total_uris+' URI(s)'))
|
||||
|
||||
// no batches means we're done here
|
||||
} else {
|
||||
@ -408,7 +408,7 @@ const MopidyMiddleware = (function(){
|
||||
// locked until we're completely done.
|
||||
setTimeout(
|
||||
function(){
|
||||
store.dispatch(uiActions.runProcess(action.type))
|
||||
store.dispatch(uiActions.runProcess(action.type, {batches: batches}))
|
||||
},
|
||||
100
|
||||
)
|
||||
|
||||
@ -151,7 +151,7 @@ class Album extends React.Component{
|
||||
|
||||
<section className="list-wrapper">
|
||||
{ this.props.album.tracks ? <TrackList className="album-track-list" tracks={ this.props.album.tracks } uri={this.props.params.uri} /> : null }
|
||||
<LazyLoadListener enabled={this.props.album.tracks_more} loadMore={ () => this.loadMore() }/>
|
||||
<LazyLoadListener loading={this.props.album.tracks_more} loadMore={ () => this.loadMore() }/>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
@ -179,7 +179,7 @@ class Artist extends React.Component{
|
||||
<h4>Albums</h4>
|
||||
<section className="grid-wrapper no-top-padding">
|
||||
<AlbumGrid albums={albums} />
|
||||
<LazyLoadListener enabled={this.props.artist.albums_more} loadMore={ () => this.loadMore() }/>
|
||||
<LazyLoadListener loading={this.props.artist.albums_more} loadMore={ () => this.loadMore() }/>
|
||||
</section>
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -195,7 +195,7 @@ class Playlist extends React.Component{
|
||||
|
||||
<section className="list-wrapper">
|
||||
{ this.props.playlist.tracks ? <TrackList uri={this.props.params.uri} className="playlist-track-list" context={context} tracks={this.props.playlist.tracks} removeTracks={ tracks_indexes => this.removeTracks(tracks_indexes) } reorderTracks={ (indexes, index) => this.reorderTracks(indexes, index) } /> : null }
|
||||
<LazyLoadListener enabled={this.props.playlist.tracks_more} loadMore={ () => this.loadMore() }/>
|
||||
<LazyLoadListener loading={this.props.playlist.tracks_more} loadMore={ () => this.loadMore() }/>
|
||||
</section>
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -198,7 +198,7 @@ class Search extends React.Component{
|
||||
<section className="list-wrapper">
|
||||
<h4><Link to={global.baseURL+'search/'+this.props.params.query+'/tracks'}>Tracks</Link></h4>
|
||||
<TrackList tracks={tracks} uri={'iris:search:'+this.props.params.type+':'+this.props.params.query} show_source_icon />
|
||||
<LazyLoadListener enabled={this.props['tracks_more'] && spotify_search_enabled} loadMore={ () => this.loadMore('tracks') }/>
|
||||
<LazyLoadListener loading={this.props['tracks_more'] && spotify_search_enabled} loadMore={ () => this.loadMore('tracks') }/>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
@ -19,6 +19,19 @@
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&:not(.active){
|
||||
input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
||||
.fa {
|
||||
color: $blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
input {
|
||||
width: 180px;
|
||||
|
||||
Reference in New Issue
Block a user