Handling event:trackPlaybackStarted with empty payload, shouldn't happen but seems to be causing crashes
This commit is contained in:
@ -137,16 +137,18 @@ const MopidyMiddleware = (function () {
|
||||
break;
|
||||
|
||||
case 'event:trackPlaybackStarted':
|
||||
store.dispatch(mopidyActions.currentTrackLoaded(data.tl_track));
|
||||
if (data.tl_track) {
|
||||
store.dispatch(mopidyActions.currentTrackLoaded(data.tl_track));
|
||||
|
||||
// Wait a jiffy before we get the next track
|
||||
// We don't want to impede snappyness for this luxury request
|
||||
setTimeout(
|
||||
() => {
|
||||
store.dispatch(mopidyActions.getNextTrack());
|
||||
},
|
||||
1000,
|
||||
);
|
||||
// Wait a jiffy before we get the next track
|
||||
// We don't want to impede snappyness for this luxury request
|
||||
setTimeout(
|
||||
() => {
|
||||
store.dispatch(mopidyActions.getNextTrack());
|
||||
},
|
||||
1000,
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'event:volumeChanged':
|
||||
|
||||
Reference in New Issue
Block a user