Skip to content

Commit

Permalink
Merge pull request #85 from Stremio/feat/serialize-player
Browse files Browse the repository at this point in the history
Feat/serialize player
  • Loading branch information
tymmesyde authored Feb 2, 2024
2 parents 072c37a + ad95e50 commit b5008ed
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 19 deletions.
115 changes: 96 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/model/serialize_player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ mod model {
pub series_info: Option<&'a stremio_core::types::resource::SeriesInfo>,
pub library_item: Option<LibraryItem<'a>>,
pub stream_state: Option<&'a StreamItemState>,
#[serde(skip_serializing_if = "Option::is_none")]
pub into_outro: Option<&'a stremio_core::types::player::IntroOutro>,
pub title: Option<String>,
pub addon: Option<model::DescriptorPreview<'a>>,
}
Expand Down Expand Up @@ -243,6 +245,7 @@ pub fn serialize_player(player: &Player, ctx: &Ctx, streaming_server: &Streaming
},
}),
stream_state: player.stream_state.as_ref(),
into_outro: player.intro_outro.as_ref(),
title: player.selected.as_ref().and_then(|selected| {
player
.meta_item
Expand Down

0 comments on commit b5008ed

Please sign in to comment.