diff --git a/komga/src/main/kotlin/org/gotson/komga/application/tasks/TaskHandler.kt b/komga/src/main/kotlin/org/gotson/komga/application/tasks/TaskHandler.kt index 189517df..f8ffe232 100644 --- a/komga/src/main/kotlin/org/gotson/komga/application/tasks/TaskHandler.kt +++ b/komga/src/main/kotlin/org/gotson/komga/application/tasks/TaskHandler.kt @@ -170,7 +170,8 @@ class TaskHandler( is Task.DeleteBook -> { bookRepository.findByIdOrNull(task.bookId)?.let { book -> - bookLifecycle.deleteBookFiles(book) + if (book.oneshot) seriesLifecycle.deleteSeriesFiles(seriesRepository.findByIdOrNull(book.seriesId)!!) + else bookLifecycle.deleteBookFiles(book) } }