Don't send kPlayStatusLoading. (#483)

fixes #461
This commit is contained in:
kaymes 2020-05-28 03:51:56 +10:00 committed by GitHub
parent e275f0a80d
commit e8ec5feb22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1191,10 +1191,11 @@ impl SpircTask {
self.play_request_id = Some(self.player.load(track, start_playing, position_ms)); self.play_request_id = Some(self.player.load(track, start_playing, position_ms));
self.update_state_position(position_ms); self.update_state_position(position_ms);
self.state.set_status(PlayStatus::kPlayStatusLoading);
if start_playing { if start_playing {
self.state.set_status(PlayStatus::kPlayStatusPlay);
self.play_status = SpircPlayStatus::LoadingPlay { position_ms }; self.play_status = SpircPlayStatus::LoadingPlay { position_ms };
} else { } else {
self.state.set_status(PlayStatus::kPlayStatusPause);
self.play_status = SpircPlayStatus::LoadingPause { position_ms }; self.play_status = SpircPlayStatus::LoadingPause { position_ms };
} }
} }