From 14220032716910199ecc6087deee57512de74497 Mon Sep 17 00:00:00 2001 From: Philippe G Date: Sat, 25 Dec 2021 00:38:56 -0800 Subject: [PATCH] player stop logic fix --- components/spotify/Shim.cpp | 3 ++- components/spotify/cspot/src/SpircController.cpp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/spotify/Shim.cpp b/components/spotify/Shim.cpp index e5a99bdb..3f313bbf 100644 --- a/components/spotify/Shim.cpp +++ b/components/spotify/Shim.cpp @@ -136,6 +136,7 @@ static void cspotTask(void *pvParameters) { break; case CSpotEventType::DISC: cspot.cHandler(CSPOT_DISC); + spircController->stopPlayer(); mercuryManager->stop(); break; case CSpotEventType::PREV: @@ -170,7 +171,7 @@ static void cspotTask(void *pvParameters) { // release auth blob and flush files cspot.blob.reset(); file->flush(); - + ESP_LOGI(TAG, "Shutting down CSpot player"); } diff --git a/components/spotify/cspot/src/SpircController.cpp b/components/spotify/cspot/src/SpircController.cpp index 2230b075..9888080b 100644 --- a/components/spotify/cspot/src/SpircController.cpp +++ b/components/spotify/cspot/src/SpircController.cpp @@ -53,7 +53,6 @@ void SpircController::setPause(bool isPaused, bool notifyPlayer) { void SpircController::disconnect(void) { player->cancelCurrentTrack(); - stopPlayer(); state->setActive(false); notify(); sendEvent(CSpotEventType::DISC);