From 37c59c5ccc3faba32c0beb923ba1a517ee8e00f7 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 13 Sep 2023 10:33:58 +0200 Subject: [PATCH] doc(library_item): document progress function --- src/types/library/library_item.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/types/library/library_item.rs b/src/types/library/library_item.rs index d2f382bb3..ec8cf43fe 100644 --- a/src/types/library/library_item.rs +++ b/src/types/library/library_item.rs @@ -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 percentage #[inline] pub fn progress(&self) -> f64 { if self.state.time_offset > 0 && self.state.duration > 0 {