fix: better handling of oneshot file deletion

Closes: #1192
This commit is contained in:
Gauthier Roebroeck 2023-08-09 10:46:40 +08:00
parent afe3233f8f
commit 9b650ccc46

View File

@ -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)
}
}