Skip to content

Commit

Permalink
Merge pull request #676 from Stremio/fix/player-library-item-time-off…
Browse files Browse the repository at this point in the history
…set-to-zero

fix(player): always update LibraryItem time_offset on NextVideo
  • Loading branch information
elpiel authored Jun 12, 2024
2 parents f74c212 + 27bfae4 commit 0dc25a6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/models/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,13 @@ impl<E: Env + 'static> UpdateWithCtx<E> for Player {
.library_item
.as_mut()
.map(|library_item| {
// instantly update the library item's time_offset.
library_item.state.time_offset = 0;
push_to_library::<E>(&mut self.push_library_item_time, library_item)

Effects::msg(Msg::Internal(Internal::UpdateLibraryItem(
library_item.to_owned(),
)))
.unchanged()
})
.unwrap_or(Effects::none().unchanged());

Expand Down

0 comments on commit 0dc25a6

Please sign in to comment.