DSPaul / COMPASS

TTRPG resource manager, bringing all your books, maps, etc. in one place.
https://www.compassapp.info
GNU General Public License v3.0
83 stars 9 forks source link

Remove books that are no longer found #23

Closed Handyfon closed 1 year ago

Handyfon commented 1 year ago

I suggest adding a feature that checks for the existence of a file at the specified path when a collection loads, and removes it if it doesn't exist. This could be accompanied by a popup. Alternatively, adding a button to prune unreferenced files would be another elegant solution.

Let me know what you think.

Thanks, Handyfon

DSPaul commented 1 year ago

Currently I check for the existence of the file only when the user tries to open it because I don't want to bother people with popups for things that aren't relevant for them at that very moment. It show a little warning popup if it's not found as you have probably noticed and you would have to close the popup, open the edit window for that file and either delete it there or change the path to point to the new location and then try to open it again.

I could upgrade that popup to include two new buttons, one to immediately open a file dialog to select the updated path location in case you moved it and immediately open it because that's what you were trying to do to begin with and one to immediately delete it, that would streamline the process a lot. I was planning to change out those popups anyway because the default windows ones look really bad.

Having a button to auto prune references to files that no longer exist is a great idea and really easy to implement. It would make a perfect pairing with the path updating feature I already made in the data management tab of the settings because both deal with outdated file references. Thanks for the ideas!