From 4cecb2289a6da84c7742041765d74a903e50e4ca Mon Sep 17 00:00:00 2001 From: Fabio Waljaard Date: Sun, 12 Jan 2025 20:39:45 +0100 Subject: [PATCH] Handle 'None' uri or empty string uri in transfer command (#1439) --- CHANGELOG.md | 1 + connect/src/state/context.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1edce464a..674e45bfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [connect] Fix "play" command not handled if missing "offset" property - [discovery] Fix libmdns zerconf setup errors not propagating to the main task. - [metadata] `Show::trailer_uri` is now optional since it isn't always present (breaking) +- [connect] Handle transfer of playback with empty "uri" field ### Removed diff --git a/connect/src/state/context.rs b/connect/src/state/context.rs index 11827cc53..5abd52fed 100644 --- a/connect/src/state/context.rs +++ b/connect/src/state/context.rs @@ -342,7 +342,7 @@ impl ConnectState { Err(StateError::InvalidTrackUri(Some(uri.clone())))? } (Some(uri), _) if !uri.is_empty() => SpotifyId::from_uri(uri)?, - (None, Some(gid)) if !gid.is_empty() => SpotifyId::from_raw(gid)?, + (_, Some(gid)) if !gid.is_empty() => SpotifyId::from_raw(gid)?, _ => Err(StateError::InvalidTrackUri(None))?, };