Skip to content

Commit

Permalink
refactor(serialize_continue_watching_preview): use library item progr…
Browse files Browse the repository at this point in the history
…ess function
  • Loading branch information
tymmesyde committed Feb 27, 2024
1 parent 80898bc commit d9c02c6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/model/serialize_continue_watching_preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,7 @@ mod model {
// else use the provided shape
_ => &library_item.poster_shape,
},
progress: if library_item.state.time_offset > 0 && library_item.state.duration > 0 {
library_item.state.time_offset as f64 / library_item.state.duration as f64
} else {
0.0
},
progress: library_item.progress(),
deep_links: LibraryItemDeepLinks::from((
library_item,
streams_item,
Expand Down

0 comments on commit d9c02c6

Please sign in to comment.