1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 09:49:31 +02:00

Handle 'None' uri or empty string uri in transfer command (#1439)

This commit is contained in:
Fabio Waljaard 2025-01-12 20:39:45 +01:00 committed by GitHub
parent 7003e98c1b
commit 4cecb2289a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -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))?,
};