BestImageViewer / geeqie

claiming to be the best image viewer / photo collection browser
http://www.geeqie.org/
GNU General Public License v2.0
472 stars 78 forks source link

Can't re-add items to collection after accidentally removing them #1151

Closed ssokolow closed 1 year ago

ssokolow commented 1 year ago

ISSUE TYPE

GEEQIE VERSION

Geeqie 2.1 GTK3

OS / DISTRIBUTION

ssokolow@monolith ~ % lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal
ssokolow@monolith ~ % flatpak --version
Flatpak 1.14.4

SUMMARY

Since at least somewhere in the Geeqie 1.x series, if I've accidentally removed the wrong image from a collection, Geeqie would refuse to let me drag-and-drop it back in unless I saved, closed, and then re-opened the collection.

I think this bug might have arrived around the same time Geeqie started refusing to allow a collection to contain the same image more than once without actually duplicating it on the hard drive. (Which you might want to do if your goal is to construct quick-and-dirty predefined slideshows using collections or create even quicker-and-dirtier weighted randomization in random slideshows.)

STEPS TO REPRODUCE

  1. Open a new collection.
  2. Drop some images in.
  3. Remove one (i.e. select and press Delete)
  4. Attempt to re-add it using drag-and-drop
caclark commented 1 year ago

(Which you might want to do if your goal is to construct quick-and-dirty predefined slideshows using collections or create even quicker-and-dirtier weighted randomization in random slideshows.)

Do you want multiple entries of the same image in a Collection, or would you simply like (in some way or other) to be able to modify a Slideshow set to include an image more than once?

[For example, a Collection is simply a list of images in a text file. Slideshows could be constructed also by lists in text files - which might lead to additional options such as variable time delays and links to audio files.

However, there may already be specialized slideshow programs which do this better than Geeqie could.

Using an external program via a plugin would be the preferable option - for me.]

ssokolow commented 1 year ago

For me, it's more about having a long collection that represents a category, and then regions within it representing subcategories, where one region might represent an artist or photographer and another might represent a theme and, if I want to subset it, open up a temporary new collection and copy a span of images into it.

If I were designing it, I'd have it allow duplicates like GQView used to (to be honest, when it started disallowing duplicates, I saw the potential that it might automatically strip duplicates on save as "corrupting my metadata"), but also have an easy-to-find way to point to an image in the file browser and then ask Geeqie to select it in the collection, since that'd save me a lot of time adding new stuff by the same author or following the same theme to that region of the collection.

(I'll definitely admit it's very much something you'd more expect from an 80-year-old with no programming experience and results in collections long enough to reveal that Geeqie's thumbnail loading is only half as fast as even my dumbest single-threaded first shot at a QImage-based PyQt reproduction of the collection view, but I don't currently have time to commit to changing solutions right now. If I can ever get my time management sufficiently in order, I have an on-hiatus effort to re-implement the parts of Geeqie's UI that I actually use in PyQt so I can rebase it on top of a SQLite+file sha1sums+decoded pixmap sha1sums+perceptual hashing+tags-esque image database I have plans for.)

...oh, having stupidly long collections with content that might be more suited to some form of meta-collections is partly because, even with my having cranked up the length of the MRU list, it's still inconvenient to have more than a certain number of collections.

caclark commented 1 year ago

@ssokolow

Having duplicates in collections is a problem because for each file Geeqie creates a unique hash from the filepath. This speeds up various operations, but having duplicate values is not possible.

For duplicate entries could you create a symlink in the same directory with some random name?

ssokolow commented 1 year ago

@ssokolow

Having duplicates in collections is a problem because for each file Geeqie creates a unique hash from the filepath. This speeds up various operations, but having duplicate values is not possible.

For duplicate entries could you create a symlink in the same directory with some random name?

Nahh. That'd be such a mess to manage that it'd be easier to just move forward with my plans to write a replica of the relevant bits of Geeqie's UI in PyQt and slap it on top of an SQLite database full of path → file_hash → pixmap_hash → metadata_including_cached_similarity_hash narrowings.

Either way, all I know is that GQView used to allow it, and that silently refusing to re-add stuff after deleting it unless you close and re-open the collection must be a bug.

caclark commented 1 year ago

@ssokolow It looks like I was wrong - there is now an option in Preferences/Behavior to permit duplicates in Collections. It also solves the re-insert problem (actually I think the problem is still there, just hidden, but if it works....).