Skip to content

Commit

Permalink
chore: Add missing runtime events for notifications
Browse files Browse the repository at this point in the history
Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed Sep 11, 2023
1 parent fccc85d commit 0b39eef
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
8 changes: 8 additions & 0 deletions src/commonMain/rust/bridge/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ impl ToProtobuf<runtime::Event, ()> for Event {
id: id.to_owned(),
})
}
Event::LibraryItemNotificationsToggled { id } => {
runtime::event::Type::LibraryItemNotificationsToggled(
runtime::event::LibraryItemNotificationsToggled { id: id.clone() },
)
}
Event::NotificationsDismissed { id } => runtime::event::Type::NotificationsDismissed(
runtime::event::NotificationsDismissed { id: id.clone() },
),
Event::LibrarySyncWithAPIPlanned { uid, plan } => {
runtime::event::Type::LibrarySyncWithApiPlanned(
runtime::event::LibrarySyncWithApiPlanned {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ option java_package = "com.stremio.core.runtime.msg";

import "google/protobuf/empty.proto";

import "stremio/core/types/video.proto";

message ActionMetaDetails {
oneof args {
bool mark_as_watched = 1;
VideoState mark_video_as_watched = 2;
}

message VideoState {
required string video_id = 1;
required stremio.core.types.Video video = 1;
required bool is_watched = 2;
}
}
24 changes: 16 additions & 8 deletions src/main/proto/stremio/core/runtime/event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ message Event {
LibraryItemAdded library_item_added = 21;
LibraryItemRemoved library_item_removed = 22;
LibraryItemRewinded library_item_rewinded = 23;
PlayerPlaying player_playing = 24;
PlayerStopped player_stopped = 25;
PlayerEnded player_ended = 26;
TraktPlaying trakt_playing = 27;
TraktPaused trakt_paused = 28;
MagnetParsed magnet_parsed = 29;
TorrentParsed torrent_parsed = 30;
PlayingOnDevice playing_on_device = 31;
LibraryItemNotificationsToggled library_item_notifications_toggled = 24;
NotificationsDismissed notifications_dismissed = 25;
PlayerPlaying player_playing = 26;
PlayerStopped player_stopped = 27;
PlayerEnded player_ended = 28;
TraktPlaying trakt_playing = 29;
TraktPaused trakt_paused = 30;
MagnetParsed magnet_parsed = 31;
TorrentParsed torrent_parsed = 32;
PlayingOnDevice playing_on_device = 33;
Error error = 100;
}

Expand Down Expand Up @@ -116,6 +118,12 @@ message Event {
message LibraryItemRewinded {
required string id = 1;
}
message LibraryItemNotificationsToggled {
required string id = 1;
}
message NotificationsDismissed {
required string id = 1;
}
message PlayerPlaying {
// Empty
}
Expand Down

0 comments on commit 0b39eef

Please sign in to comment.