try to fix misc cspot issues + silence network manager log

This commit is contained in:
philippe44
2022-09-12 11:54:49 -07:00
parent a8e28f9ff0
commit 922889fee2
9 changed files with 45 additions and 30 deletions

View File

@@ -190,10 +190,10 @@ void SpircController::handleFrame(std::vector<uint8_t> &data) {
void SpircController::loadTrack(uint32_t position_ms, bool isPaused) {
sendEvent(CSpotEventType::LOAD, (int) position_ms);
state->setPlaybackState(PlaybackState::Loading);
std::function<void()> loadedLambda = [=]() {
std::function<void(bool)> loadedLambda = [=](bool needFlush) {
// Loading finished, notify that playback started
setPause(isPaused, false);
sendEvent(CSpotEventType::PLAYBACK_START);
sendEvent(CSpotEventType::PLAYBACK_START, needFlush);
};
player->handleLoad(state->getCurrentTrack(), loadedLambda, position_ms,