mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 01:39:28 +02:00
Handle 'None' uri or empty string uri in transfer command (#1439)
This commit is contained in:
parent
7003e98c1b
commit
4cecb2289a
2 changed files with 2 additions and 1 deletions
|
@ -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
|
- [connect] Fix "play" command not handled if missing "offset" property
|
||||||
- [discovery] Fix libmdns zerconf setup errors not propagating to the main task.
|
- [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)
|
- [metadata] `Show::trailer_uri` is now optional since it isn't always present (breaking)
|
||||||
|
- [connect] Handle transfer of playback with empty "uri" field
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -342,7 +342,7 @@ impl ConnectState {
|
||||||
Err(StateError::InvalidTrackUri(Some(uri.clone())))?
|
Err(StateError::InvalidTrackUri(Some(uri.clone())))?
|
||||||
}
|
}
|
||||||
(Some(uri), _) if !uri.is_empty() => SpotifyId::from_uri(uri)?,
|
(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))?,
|
_ => Err(StateError::InvalidTrackUri(None))?,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue