mirror of
https://github.com/gotson/komga.git
synced 2025-12-20 23:45:11 +01:00
fix: refresh series metadata and aggregation after book deletion
in some cases the series metadata and aggregation could be incorrect after a book deletion
This commit is contained in:
parent
d570deba4c
commit
9e4443765b
1 changed files with 3 additions and 1 deletions
|
|
@ -21,7 +21,8 @@ class LibraryContentLifecycle(
|
|||
private val bookRepository: BookRepository,
|
||||
private val bookLifecycle: BookLifecycle,
|
||||
private val mediaRepository: MediaRepository,
|
||||
private val seriesLifecycle: SeriesLifecycle
|
||||
private val seriesLifecycle: SeriesLifecycle,
|
||||
private val taskReceiver: TaskReceiver,
|
||||
) {
|
||||
|
||||
fun scanRootFolder(library: Library) {
|
||||
|
|
@ -101,6 +102,7 @@ class LibraryContentLifecycle(
|
|||
.let { books ->
|
||||
logger.info { "Deleting books not on disk anymore: $books" }
|
||||
bookLifecycle.deleteMany(books.map { it.id })
|
||||
books.map { it.seriesId }.distinct().forEach { taskReceiver.refreshSeriesMetadata(it) }
|
||||
}
|
||||
|
||||
// add new books
|
||||
|
|
|
|||
Loading…
Reference in a new issue