Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'play' command requiring 'offset' field #1418

Merged
merged 2 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
on Android platform.
- [core] Fix "Invalid Credentials" when using a Keymaster access token and
client ID on Android platform.
= [connect] Fix "play" command not handled if missing "offset" property

### Removed

Expand Down
2 changes: 1 addition & 1 deletion connect/src/spirc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ impl SpircTask {
context_uri: play.context.uri.clone(),
start_playing: true,
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,
repeat,
repeat_track,
Expand Down
4 changes: 2 additions & 2 deletions core/src/dealer/protocol/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub struct TransferOptions {

#[derive(Clone, Debug, Deserialize)]
pub struct PlayOptions {
pub skip_to: SkipTo,
pub skip_to: Option<SkipTo>,
#[serde(default, deserialize_with = "option_json_proto")]
pub player_options_override: Option<ContextPlayerOptionOverrides>,
pub license: Option<String>,
Expand All @@ -191,7 +191,7 @@ pub struct OptionsOptions {
system_initiated: bool,
}

#[derive(Clone, Debug, Deserialize)]
#[derive(Clone, Debug, Deserialize, Default)]
pub struct SkipTo {
pub track_uid: Option<String>,
pub track_uri: Option<String>,
Expand Down
Loading