Deleting / hiding photos

A user just asked me this over email:

I know a delete feature is not available yet; 1) will that be something available when 1.0 is released or will it be later in the future?

I’m trying to get at least initial support into v1.0.0. There will be subsequent improvements in future releases.

  1. with no official delete method, what is your recommended way? It looks like I can get the delete by the info button in the top right corner. If I manually delete that file, is there anything else I need to do like deleting thumbnail files, updating the database?

If you manually remove all image variants, or move them into a NoMedia directory, that asset will be removed from your library. When that happens, previews, thumbnails and transcoded videos are removed from your library automatically as part of the sync process.

I did some more research for file deletions.

I’m going to mark files for deletion in the DB, and then add an “empty trash” button in the nav menu that will use this technique as a safeguard, along with a link that opens a page listing all the paths about to be unlinked.

Why this solution and not some of the other discussed options?

  1. Moving files into a platform-specific “trash can” only works on local drives, and only on macOS and Windows. Linux support for trash is spotty, but I could ask users to install trash-cli. A “trash can” doesn’t make sense for Docker users, as ~/.local/share/Trash/ will be ephemeral to the image.

  2. I tend to be susceptible to “ooooh, that’s clever” solutions, which tend to be too clever by half. I feel like a hidden local directory may be confusing for most users, especially because I don’t know of any software that does this sort of handling of deletions.

  3. Moving files into a folder that you need to delete manually requires PhotoStructure to have a flawless view of volumes. It has a really good view of current volumes, but (especially on macOS) the APFS volume list is borked/shows duplicates that can be confusing. Loopback bind-mount folders, symlinks, and N other exotic filesystem constructs will get in the way of “what filesystem hosts this file” and “where should it go to delete it”.

Related:

1 Like

I have a picture of someone blinking, and I want to delete that picture.

I used Windows Explorer to browse to the source location of the original image, and I deleted the picture. I then clicked “re-sync this asset” in photostructure, but the picture remains in my photostructure library.

I currently have “May photostructure organize your photos and videos?” set to YES. Does this mean I have to delete the picture twice for it to go away? (manually delete original photo, then manually delete photostructure library photo?).

I don’t know if this is a bug, a feature that’s not implemented yet, or an opportunity for end user education.

As long as there is an asset file variant, the asset won’t be removed. You can see where PhotoStructure thinks all the variants are by opening the asset info panel (tap “i” or click the i in the upper right).

Yup! You’ll need to delete both files. Total PITA, I know. Supporting hide/delete (this feature) will be the next thing I build.

It’s certainly a feature that’s not implemented yet. Until it’s implemented, I guess it’s an opportunity for education?

Anyway, I’ll get this built as soon as I ship v1.0.0, which should be tomorrow.

I have the same issue as @bartv, I have a lot of screenshots I don’t want to clutter up my photographs.

I set PS_REQUIRE_MAKE_MODEL=true a few days ago, and when I resync individual screenshots, they disappear from PhotoStructure, as you said. But do I have to resync each image individually?

I still see loads of screenshots in the general views of PhotoStructure (for example among the thumbnails in the main view of the application).

Is it just a matter of waiting for PhotoStructure to get through all my images again? I have tried restarting sync a couple of times. I’m not sure if there are fewer screenshots than before, but they are definitely not gone completely.

Ah, I see. Well, there are several solutions:

  1. PhotoStructure will automatically re-sync assets that are visited with the asset info panel open. (No, this isn’t documented or even discoverable: it was an experiment to help me debug locally, and I don’t think it’s generally a great idea (?), but at least for the time being, this is how PhotoStructure works).

  2. Run a “library rebuild”: it’s already in the product, and it’s easy for you to start (via the nav menu), but it’ll take a while and do a bunch of work that isn’t necessary.

  3. You can run a sync --force manually via the command line for the affected directories. Know that you can give sync as many files and directories on the command line as you need, and they don’t need to be directories currently in your “scan paths”. The --force tells sync and sync-file to disable the “no-op” filter that skips over files are “already in sync” (if their mtime and size match what’s in the database), and actually re-import the files.

./photostructure sync --force /path/to/dir1 /path/to/dir2 ...
  1. In the future, PhotoStructure should somehow remember what settings were configured at some point in time, and if the settings change, prompt the user

You’ve changed settings since your last sync. Would you like to rebuild your library to make the new settings take effect? This may take a while.

[ OK ]   [ cancel ]

This would cover the use case of people upgrading to PLUS from LITE, as well as changes like setting requireMakeModel.

2 Likes

Found this chain looking for existing “hiding” feature requests… looks like the discussion pretty rapidly moved toward how to delete, but I would like to resurface the “hidden” flag concept.

I think there are two levels to this, probably… one is the “user access”, lock pictures behind a password, they are absolutely not to be seen except by approved users.

But then there is a lesser level. Some pictures I may want to keep, but they just aren’t very flattering, or the content is just a little offputting (I have a picture of a friend who had suffered an injury and sent me a picture - I want to keep it, but I don’t really want it popping up in the random display list).

Not sure it’s high up the priority list, but thought I would toss it out there as another use case to mull over.

Another use case for hiding are photos of documents, receipts, or other one-off photos that I want to keep around “just in case”, but really don’t ever want to see when scrolling through the timeline view or other views.

In other software the term “archive” is often used to hide items like this.

This feature will ship in v1.2!

:tada:

I decided on using “archive” terminology instead of “hide” as it aligns with Google Photos. (the icon for “hide” and “show” aren’t exactly intuitive, either).

Archived and trashed assets are not shown in tag galleries, nor are they shown in streams or when navigating left/right by date.

Here’s a sneak peek of the button bar for an unliked, unarchived, and undeleted photo:

image

After toggling all of the options:

image

And on mobile, here’s the menu:

New nav menu items:

image

Search will include an “action bar” when viewing deleted assets, which will include a “empty trash” button that actually deletes files from the filesystem. I’m building that bit today.

5 Likes

I nearly hate to ask, but any chance to have an option that disables or hides ‘trash’? In terms of making sure a family member can’t trash something?

Accidentally archiving something is annoying… trash isn’t.

I’ll add a setting that contains a pass phrase needed to empty the trash, that shouldn’t be hard.

Edit: I misunderstood the request.

The next release will have 2 new boolean settings to disable the asset view’s remove from library and delete buttons, and 2 additional boolean settings to disable the “actually do it” buttons on the “recently removed” and “recently deleted” views.

@mrm I think @bdillahu asking for settings to disable the delete capability completely. That sounds like a reasonable request, but eventually what will probably be needed is some sort of admin login for edit/delete/archive. Without login, everything should probably be read-only.

edit: it doesn’t need to be anything fancy like implement full fine-grained user/group/role management. Just a simple login with passphrase setting to enable edit capabilities.

I’ve added this to the next build. Thanks for the suggestion!

I’ve also added “remove from library”, so now there are three buttons to make an asset to away from tag galleries and (most) search results:

Not visible in tag galleries or search Removed from library Removed from disk
archive :white_check_mark:
remove :white_check_mark: :white_check_mark:
delete :white_check_mark: :white_check_mark: :white_check_mark:

Note that for “remove” and “delete” the operations aren’t “executed” until someone clicks the “remove assets” or “empty trash” button from the search page—only then do the records get moved into an exclude list of SHAs (so they’re not imported again by accident) and, for deleted assets, all variations get deleted from (mounted) disk(s).

I thought about having an automatic “trash is emptied automatically” feature, but I’m shelving that idea for this release.

I just wrote up the official documentation for this feature:

As always, if you find anything odd or confusing, or have any other suggestions, know that I’m all ears.

Could you clarify what metadata field is used for ‘liked’?

I answered this here:

I like the implementation of deleting images. It seems to work quite well and is nice for curating my collection. I think mulitple/bulk select in the grid view would be amazing to combine with the delete/hiding of photos.

1 Like

The multiple select in grid view is very important to me - I can see alot of files to delete or hide and to go into each file is a real pain!

1 Like

Absolutely, me too. I will get to it, I promise! Be sure to vote on any/all of these features: https://forum.photostructure.com/tag/bulk

(and if you have thoughts or suggestions for any of them, please do share!)