From bbfc309ec0ff56ac28622d381de9545988daa4a2 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 4 Mar 2025 12:11:06 +0100 Subject: [PATCH] feat: add mark season as watched meta details action --- .../proto/stremio/core/runtime/action_meta_details.proto | 6 ++++++ stremio-core-protobuf/src/bridge/action.rs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/stremio-core-protobuf/proto/stremio/core/runtime/action_meta_details.proto b/stremio-core-protobuf/proto/stremio/core/runtime/action_meta_details.proto index 9d39335c..4969bc30 100644 --- a/stremio-core-protobuf/proto/stremio/core/runtime/action_meta_details.proto +++ b/stremio-core-protobuf/proto/stremio/core/runtime/action_meta_details.proto @@ -12,10 +12,16 @@ message ActionMetaDetails { oneof args { bool mark_as_watched = 1; VideoState mark_video_as_watched = 2; + MarkSeasonAsWatchedArgs mark_season_as_watched = 3; } message VideoState { required stremio.core.types.Video video = 1; required bool is_watched = 2; } + + message MarkSeasonAsWatchedArgs { + required uint32 season = 1; + required bool watched = 2; + } } \ No newline at end of file diff --git a/stremio-core-protobuf/src/bridge/action.rs b/stremio-core-protobuf/src/bridge/action.rs index e04686af..885e8063 100644 --- a/stremio-core-protobuf/src/bridge/action.rs +++ b/stremio-core-protobuf/src/bridge/action.rs @@ -145,6 +145,12 @@ impl FromProtobuf for runtime::Action { video_state.is_watched, )) } + Some(action_meta_details::Args::MarkSeasonAsWatched(args)) => { + Action::MetaDetails(ActionMetaDetails::MarkSeasonAsWatched( + args.season, + args.watched, + )) + } None => unimplemented!("ActionMetaDetails missing"), } }