Skip to content

Commit

Permalink
fix(services/integration): handle case when ebook progress is returne…
Browse files Browse the repository at this point in the history
…d in place of normal progress
  • Loading branch information
IgnisDa committed Jan 2, 2025
1 parent e052423 commit 17cf833
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions crates/services/integration/src/yank/audiobookshelf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,12 @@ where
"Got response for individual item progress {:?}",
resp
);
let progress = if let Some(ebook_progress) = resp.ebook_progress {
ebook_progress
} else {
resp.progress
};
let mut progress = resp.progress;
if let Some(ebook_progress) = resp.ebook_progress {
if ebook_progress > progress {
progress = ebook_progress;
}
}
result
.completed
.push(ImportCompletedItem::Metadata(ImportOrExportMetadataItem {
Expand Down

0 comments on commit 17cf833

Please sign in to comment.