Skip to content

Commit

Permalink
doc(library_item): document progress function
Browse files Browse the repository at this point in the history
  • Loading branch information
tymmesyde committed Sep 13, 2023
1 parent e8a4179 commit ac2be00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/types/library/library_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ impl LibraryItem {
pub fn is_in_continue_watching(&self) -> bool {
self.r#type != "other" && (!self.removed || self.temp) && self.state.time_offset > 0
}

/// Returns watch progress in milliseconds
#[inline]
pub fn progress(&self) -> f64 {
if self.state.time_offset > 0 && self.state.duration > 0 {
Expand Down

0 comments on commit ac2be00

Please sign in to comment.