mirror of
https://github.com/gotson/komga.git
synced 2025-12-20 07:23:34 +01:00
fix(api): only mark unread book as read for tachiyomi readlist
This commit is contained in:
parent
884573e20d
commit
6609e4ce04
1 changed files with 4 additions and 1 deletions
|
|
@ -309,7 +309,10 @@ class ReadListController(
|
|||
BookSearchWithReadProgress(),
|
||||
UnpagedSorted(Sort.by(Sort.Order.asc("readList.number")))
|
||||
).filterIndexed { index, _ -> index < readProgress.lastBookRead }
|
||||
.forEach { book -> bookLifecycle.markReadProgressCompleted(book.id, principal.user) }
|
||||
.forEach { book ->
|
||||
if (book.readProgress?.completed != true)
|
||||
bookLifecycle.markReadProgressCompleted(book.id, principal.user)
|
||||
}
|
||||
} ?: throw ResponseStatusException(HttpStatus.NOT_FOUND)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue