From f83915e2124ef47d2c5e64bda6351ae78397b2b6 Mon Sep 17 00:00:00 2001 From: engineergreen Date: Wed, 22 Jul 2020 15:28:39 +0100 Subject: [PATCH] Issue #497 - Playing songs from android app (#501) * Issue #497 - Playing songs from android app Implement the fix suggested by @Johannesd3 * Fix formatting --- connect/src/spirc.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/connect/src/spirc.rs b/connect/src/spirc.rs index b4c657f..0dd6709 100644 --- a/connect/src/spirc.rs +++ b/connect/src/spirc.rs @@ -790,7 +790,11 @@ impl SpircTask { } MessageType::kMessageTypeNotify => { - if self.device.get_is_active() && frame.get_device_state().get_is_active() { + if self.device.get_is_active() + && frame.get_device_state().get_is_active() + && self.device.get_became_active_at() + <= frame.get_device_state().get_became_active_at() + { self.device.set_is_active(false); self.state.set_status(PlayStatus::kPlayStatusStop); self.player.stop();