Skip to content

Commit

Permalink
fix: Player - don't send seek logs if empty
Browse files Browse the repository at this point in the history
Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed Dec 4, 2023
1 parent 7f1258b commit d1c63f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/models/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -948,8 +948,9 @@ fn seek_update<E: Env + 'static>(
seek_history: &mut Vec<SeekLog>,
outro: Option<u64>,
) -> Effects {
let seek_request_effects = match (selected, video_params, series_info, library_item) {
(Some(selected), Some(video_params), Some(series_info), Some(library_item)) => {
let has_seeks_or_outro = !seek_history.is_empty() || matches!(outro, Some(outro) if outro > 0);
let seek_request_effects = match (has_seeks_or_outro, selected, video_params, series_info, library_item) {
(true, Some(selected), Some(video_params), Some(series_info), Some(library_item)) => {
match (
&selected.stream.source,
selected.stream.name.as_ref(),
Expand Down

0 comments on commit d1c63f3

Please sign in to comment.