From d9c02c67f382c27c7b5c4ca642d2fa8de4cf5306 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 27 Feb 2024 12:25:08 +0100 Subject: [PATCH] refactor(serialize_continue_watching_preview): use library item progress function --- src/model/serialize_continue_watching_preview.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/model/serialize_continue_watching_preview.rs b/src/model/serialize_continue_watching_preview.rs index c1d4696..59286b2 100644 --- a/src/model/serialize_continue_watching_preview.rs +++ b/src/model/serialize_continue_watching_preview.rs @@ -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,