From aa1c3f93fcb891436f7952eb04e62fd85b006d47 Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Tue, 19 Nov 2024 10:50:27 +0200 Subject: [PATCH] feat(stremio-core-protobuf): Player - SeekAction Signed-off-by: Lachezar Lechev --- .../proto/stremio/core/runtime/action_player.proto | 9 +++++---- stremio-core-protobuf/src/bridge/action.rs | 7 +++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/stremio-core-protobuf/proto/stremio/core/runtime/action_player.proto b/stremio-core-protobuf/proto/stremio/core/runtime/action_player.proto index 4525ee2..057c2d2 100644 --- a/stremio-core-protobuf/proto/stremio/core/runtime/action_player.proto +++ b/stremio-core-protobuf/proto/stremio/core/runtime/action_player.proto @@ -11,10 +11,11 @@ message ActionPlayer { oneof args { stremio.core.models.Player.VideoParams video_params_changed = 1; stremio.core.models.Player.StreamState stream_state_changed = 2; - PlayerItemState time_changed = 3; - bool paused_changed = 4; - google.protobuf.Empty next_video = 5; - google.protobuf.Empty ended = 6; + PlayerItemState seek_action = 3; + PlayerItemState time_changed = 4; + bool paused_changed = 5; + google.protobuf.Empty next_video = 6; + google.protobuf.Empty ended = 7; } message PlayerItemState { diff --git a/stremio-core-protobuf/src/bridge/action.rs b/stremio-core-protobuf/src/bridge/action.rs index ba154f5..9971264 100644 --- a/stremio-core-protobuf/src/bridge/action.rs +++ b/stremio-core-protobuf/src/bridge/action.rs @@ -198,6 +198,13 @@ impl FromProtobuf for runtime::Action { state: stream_state.from_protobuf(), }) } + Some(action_player::Args::SeekAction(seek_state)) => { + Action::Player(ActionPlayer::Seek { + time: seek_state.time, + duration: seek_state.duration, + device: seek_state.device.to_owned(), + }) + } Some(action_player::Args::TimeChanged(item_state)) => { Action::Player(ActionPlayer::TimeChanged { time: item_state.time,