From 46e269a290e0fd7f7c05a970eb5d82104b0c9563 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Sun, 7 Jun 2026 15:10:54 +0200 Subject: [PATCH] fix: resume playback on non-empty queue regardless of transport state Removes the strict `transport_state` condition and now triggers `api.resume(id)` solely based on a non-empty queue. This improves resilience against transient or unknown device states, such as post-sleep-timer or network errors, where transport state strings may mismatch expected values but playback should still proceed. --- PMOMusic/Cargo.toml | 2 +- pmoapp/webapp/src/composables/useRenderers.ts | 10 +++++----- version.txt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/PMOMusic/Cargo.toml b/PMOMusic/Cargo.toml index 18df9b9c..b37f9d90 100644 --- a/PMOMusic/Cargo.toml +++ b/PMOMusic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "PMOMusic" -version = "0.3.49" +version = "0.3.50" edition = "2024" [dependencies] diff --git a/pmoapp/webapp/src/composables/useRenderers.ts b/pmoapp/webapp/src/composables/useRenderers.ts index 2746ed83..8b3f5e2d 100644 --- a/pmoapp/webapp/src/composables/useRenderers.ts +++ b/pmoapp/webapp/src/composables/useRenderers.ts @@ -451,11 +451,11 @@ async function resumeOrPlayFromQueue(id: string) { return play(id); } - // Check if queue has content - if ( - ["STOPPED", "NO_MEDIA"].includes(state.transport_state) && - snapshot.queue.items.length > 0 - ) { + // If queue has items, always try to play from queue regardless of transport + // state. After a sleep timer stop, the device may report an unknown/transient + // state ("load", network error → "UNKNOWN", etc.) that doesn't match the + // expected "STOPPED"/"NO_MEDIA" strings, yet the queue is non-empty. + if (snapshot.queue.items.length > 0) { return api.resume(id); } diff --git a/version.txt b/version.txt index b3682c13..cd3dcaaf 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.3.49 +0.3.50