mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Fix 'play' command requiring 'offset' field (#1418)
* Fix 'play' command requiring 'offset' field * Derive 'Default' for SkipTo
This commit is contained in:
parent
72b6ad9397
commit
00679fc78d
3 changed files with 4 additions and 3 deletions
|
@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
on Android platform.
|
on Android platform.
|
||||||
- [core] Fix "Invalid Credentials" when using a Keymaster access token and
|
- [core] Fix "Invalid Credentials" when using a Keymaster access token and
|
||||||
client ID on Android platform.
|
client ID on Android platform.
|
||||||
|
= [connect] Fix "play" command not handled if missing "offset" property
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -1040,7 +1040,7 @@ impl SpircTask {
|
||||||
context_uri: play.context.uri.clone(),
|
context_uri: play.context.uri.clone(),
|
||||||
start_playing: true,
|
start_playing: true,
|
||||||
seek_to: play.options.seek_to.unwrap_or_default(),
|
seek_to: play.options.seek_to.unwrap_or_default(),
|
||||||
playing_track: play.options.skip_to.into(),
|
playing_track: play.options.skip_to.unwrap_or_default().into(),
|
||||||
shuffle,
|
shuffle,
|
||||||
repeat,
|
repeat,
|
||||||
repeat_track,
|
repeat_track,
|
||||||
|
|
|
@ -170,7 +170,7 @@ pub struct TransferOptions {
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize)]
|
#[derive(Clone, Debug, Deserialize)]
|
||||||
pub struct PlayOptions {
|
pub struct PlayOptions {
|
||||||
pub skip_to: SkipTo,
|
pub skip_to: Option<SkipTo>,
|
||||||
#[serde(default, deserialize_with = "option_json_proto")]
|
#[serde(default, deserialize_with = "option_json_proto")]
|
||||||
pub player_options_override: Option<ContextPlayerOptionOverrides>,
|
pub player_options_override: Option<ContextPlayerOptionOverrides>,
|
||||||
pub license: Option<String>,
|
pub license: Option<String>,
|
||||||
|
@ -191,7 +191,7 @@ pub struct OptionsOptions {
|
||||||
system_initiated: bool,
|
system_initiated: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize)]
|
#[derive(Clone, Debug, Deserialize, Default)]
|
||||||
pub struct SkipTo {
|
pub struct SkipTo {
|
||||||
pub track_uid: Option<String>,
|
pub track_uid: Option<String>,
|
||||||
pub track_uri: Option<String>,
|
pub track_uri: Option<String>,
|
||||||
|
|
Loading…
Reference in a new issue