Skip to content

Commit

Permalink
fix: better handling of oneshot file deletion
Browse files Browse the repository at this point in the history
Closes: #1192
  • Loading branch information
gotson committed Aug 9, 2023
1 parent afe3233 commit 9b650cc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 9b650cc

Please sign in to comment.