stumpapp / stump

A free and open source comics, manga and digital book server with OPDS support (WIP)
https://stumpapp.dev
MIT License
1.04k stars 46 forks source link

[FEATURE] delete (soft and hard) book support #336

Open Leiasticot opened 6 months ago

Leiasticot commented 6 months ago

Describe the bug I didn't have any button to delete a file, and when I delete it from then files still be inside my libraries. Even inside Settings.

To Reproduce Steps to reproduce the behavior:

  1. .cbz from a webtoon
  2. delete files from the server with rm -r
  3. Inside the library

Expected behavior When I delete a file inside my server then it is deleted from the library (or at least use a button to not see it always).

Screenshots image image image image

Desktop (please complete the following information):

aaronleopold commented 6 months ago

This isn’t necessarily a bug, there is just no delete button or logic to automatically delete books today, but I do think the issue highlights a few areas where we could define better UX in general around these situations.

If a known entity (series, book, etc) is unable to be located on disk during a scan, it’s marked as missing. I recall a few places where books may be marked as missing outside of a scan during API usage, but can’t remember where offhand.

So I guess one question would be is it desirable to update the status of books missing from disk even in some GET requests? Or should it stay as only setting the status when explicitly asked (i.e. during a scan)?

Regardless, delete/trash operations can definitely be added. Initially I’d do it per entity, but then it would be planned accordingly for https://github.com/stumpapp/stump/issues/258

Cantello commented 2 months ago

One related question here: When I rename a book/series after it has been scanned, I have duplicates in my library. Is there any way to remove the duplicates or the missing entities you mentioned above?

aaronleopold commented 2 months ago

One related question here: When I rename a book/series after it has been scanned, I have duplicates in my library. Is there any way to remove the duplicates or the missing entities you mentioned above?

Yes, there is a Clean library operation in a library's settings which will hard delete them in the database. Eventually, there will be options for soft deletion in some capacity alongside bulk management features (https://github.com/stumpapp/stump/issues/258)

Cantello commented 2 months ago

Thanks, I don't know how I missed this when I was looking...

aaronleopold commented 2 months ago

Thanks, I don't know how I missed this when I was looking...

Depending on what version you are trying out, it can be easy to miss. The latest builds are just a long scrollable page, but I've been experimenting with more segmentation in nightly/experimental images and have this housed in a Deletion section in a secondary navigation menu in library settings