Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

Commit

Permalink
fix(serialize_player): pass stream_request to VideoDeepLinks
Browse files Browse the repository at this point in the history
  • Loading branch information
tymmesyde committed Mar 21, 2024
1 parent 75297a3 commit 714e6d5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/model/serialize_player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,14 @@ pub fn serialize_player(player: &Player, ctx: &Ctx, streaming_server: &Streaming
next_video: player
.selected
.as_ref()
.and_then(|selected| selected.meta_request.as_ref())
.and_then(|selected| {
selected
.meta_request
.as_ref()
.zip(selected.stream_request.as_ref())
})
.zip(player.next_video.as_ref())
.map(|(request, video)| model::Video {
.map(|((meta_request, stream_request), video)| model::Video {
video,
upcoming: player
.meta_item
Expand Down Expand Up @@ -219,7 +224,8 @@ pub fn serialize_player(player: &Player, ctx: &Ctx, streaming_server: &Streaming
.unwrap_or_default(),
deep_links: VideoDeepLinks::from((
video,
request,
stream_request,
meta_request,
&streaming_server.base_url,
&ctx.profile.settings,
))
Expand Down

0 comments on commit 714e6d5

Please sign in to comment.