gotson / komga

Media server for comics/mangas/BDs/magazines/eBooks with API and OPDS support
https://komga.org
MIT License
3.76k stars 219 forks source link

Can't delete unavailable book #1605

Closed Ay1tsMe closed 2 months ago

Ay1tsMe commented 2 months ago

Steps to reproduce

  1. Delete a folder that contains the book locally on the filesystem
  2. Replace the book with the same folder name but with more chapters
  3. Old book now shows unavailable
  4. Try to remove the old book but nothing happens

Expected behavior

Book should be removed from library

Actual behavior

Nothing happens. It is just stuck in the library. In the logs it says it deletes the books from my database successfully but they are still there. I have also tried to rename the folder path and then try to delete the broken book but then it says cant delete path is not found.

Logs

2024-06-10T23:08:21.221+08:00 INFO 1 --- [http-nio-25600-exec-30] o.g.komga.application.tasks.TaskEmitter : Sending task: DeleteSeries(seriesId='0ESB5F7HPKFHJ', priority='8') 2024-06-10T23:08:21.265+08:00 INFO 1 --- [taskProcessor-5] o.g.komga.application.tasks.TaskHandler : Executing task: DeleteSeries(seriesId='0ESB5F7HPKFHJ', priority='8') 2024-06-10T23:08:21.268+08:00 INFO 1 --- [taskProcessor-5] o.g.k.domain.service.SeriesLifecycle : Soft delete series: [Series(name=One Piece v105+, url=file:/data/manga/One%20Piece/One%20Piece%20v105+/, fileLastModified=2024-01-10T23:27:24.409, id=0ESB5F7HPKFHJ, libraryId=0D16SK6J1Q48W, bookCount=42, deletedDate=2024-06-10T23:08:02.130, oneshot=false, createdDate=2024-01-10T23:28:01, lastModifiedDate=2024-06-10T23:08:02.131)] 2024-06-10T23:08:21.269+08:00 INFO 1 --- [taskProcessor-5] o.g.komga.domain.service.BookLifecycle : Soft delete books: [] 2024-06-10T23:08:21.288+08:00 INFO 1 --- [taskProcessor-5] o.g.komga.application.tasks.TaskHandler : Task DeleteSeries(seriesId='0ESB5F7HPKFHJ', priority='8') executed in 22.198344ms

Komga version

1.11.1

Operating system

Debian/Docker

Installation method

Docker

Other details

image

Acknowledgements

kiriya-aoi commented 2 months ago

https://komga.org/docs/guides/trash/ ?

Ay1tsMe commented 2 months ago

Yep should of read the documentation more thoroughly.

Although I think the "Unavailable" tag is misleading for books that have been deleted on purpose by the user. I don't know if this behaviour happens if you choose to delete a book in the UI and not through the filesystem, but if both methods show "unavailable" when deleted, then maybe have a "recycling bin" section of the library that users can restore or delete instead of showing the "unavailable" tag. That way users like myself don't get confused as to why it's still in the library after deleting. Just a suggestion.