Changing the scan directory should update ownership of already scanned photos

Author: derneuereCreated Sep 16, 2026Updated Sep 16, 2026
Labelsenhancementbackend

Summary

Changing a user's scan directory should update the ownership and visibility of already scanned photos, or at least offer to. Split out of #492.

Current behaviour

If an admin points user A at the wrong folder, scans, and then corrects the path, the photos from the wrong folder stay owned by user A and remain visible in their library. Recovering means deleting the photos by hand or wiping the database.

Proposed change

When the scan directory changes, offer one of the following in the user edit modal, with the choice sent to the backend:

  • Keep existing photos (current behaviour).
  • Remove photos that are no longer under the new scan directory from this user (move them to trash or delete their database rows, files untouched).
  • If the new directory belongs to another user, that user picks them up on their next scan.

Implement as a LongRunningJob so large libraries do not block the request, and show progress in the jobs list.