Skip to content

.nogallery does not remove an existing folder-based gallery during Clean #7179

Description

@johnjopkov

Have you enabled troubleshooting mode?

  • I confirm that the troubleshooting mode is enabled.

Describe the bug

When .nogallery marker is added to a directory that already has a folder-based gallery, running the Clean task leaves that gallery in the database.

The marker prevents a new folder-based gallery from being created during Scan, but it has no effect on a gallery that was created before the marker was added.
As a result, .nogallery cannot be used to opt an existing directory out of folder-gallery creation without manually deleting the gallery.

Steps to reproduce

  1. Enable Create galleries from folders containing images in the Library settings.
  2. Add a directory containing one or more images to a Stash library.
  3. Run Scan and confirm that Stash creates a folder-based gallery for that directory.
  4. Create a lowercase file named .nogallery inside the same directory.
  5. Run Clean for the library, or selectively for a path containing that directory.
  6. Open the Galleries page.

Observed result: the folder-based gallery remains in the database even though its directory now contains .nogallery.

Expected behaviour

Clean should remove the folder-based gallery from the database when its directory contains .nogallery.

There are also details like:

  • what to do with images when the gallery is deleted by .nogallery reason? Probably they should stay, since scanning such folders would still produce images, but would not produce the gallery (questionable logic to begin with, but choosing consistency is simpler)
  • .forcegallery and .nogallery files in the same folder conflict - resolve the same way scanning does - force has precedence

Screenshots or additional context

not relevant

Stash version

0.31.1

Device details

not relevant

Relevant log output

not relevant

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug reportUnverified user created bug reports

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions