lehitoskin / ivy

Ivy, the Taggable Image Viewer
GNU General Public License v3.0
16 stars 3 forks source link

Collection / Directory Reloading #105

Open IonoclastBrigham opened 5 years ago

IonoclastBrigham commented 5 years ago

Sometimes, a collection will change on disk while browsing through it with Ivy, e.g. you import your camera contents while browsing through your raw photo dump directory, or you delete some duplicates. It is desirable for the collection to be reloaded without having to go through the hassle of re-selecting all relevant directories and files from one or more system file dialogs.

Logic Rules and Behaviors

When reloading the current collection Ivy MUST...

If possible and practical, Ivy SHOULD...

UX

This feature could be completely manual, triggered on-demand by one or more of a menu item, a toolbar button, and an accelerator key combo. This would be a reasonable enough choice as the user should know when they've made changes to their image collections on disk, but the real value-add is automating the whole thing.

One could periodically poll for changes, but for very large directories this doesn't scale very nicely. The better alternative would be to "watch" the appropriate files and directories, and react to changes in an event-driven manner.

A quick search did not reveal a racket-native (or via FFI) solution that works across platforms, but further research may lead to a suitable open source solution.

lehitoskin commented 5 years ago

One thing to watch out for is that Ivy will modify files by editing the embedded XMP data in a given file, so we should also do some sort of delay on an event-based refresh when Ivy knows it's also been modifying metadata for files.