Ending of track flushes out the current playing track

This commit is contained in:
James Barnsley
2018-04-11 16:44:41 +12:00
parent 5f8cb25b42
commit 4736f85ff2
6 changed files with 25392 additions and 23455 deletions

View File

@ -171,6 +171,14 @@ export function getCurrentTrack(){
}
}
export function clearCurrentTrack(){
return {
type: 'CURRENT_TRACK_LOADED',
current_track: null,
current_track_uri: null
}
}
export function currentTrackLoaded(tl_track){
return {
type: 'MOPIDY_CURRENT_TRACK_LOADED',

View File

@ -91,6 +91,7 @@ const MopidyMiddleware = (function(){
break;
case 'event:trackPlaybackEnded':
store.dispatch(mopidyActions.clearCurrentTrack());
store.dispatch(mopidyActions.getTimePosition());
break;