Skip to content

fix: cleanup orphaned images when removing extra paths#921

Merged
zanllp merged 1 commit into
mainfrom
fix/cleanup-orphaned-images-on-path-removal
Feb 18, 2026
Merged

fix: cleanup orphaned images when removing extra paths#921
zanllp merged 1 commit into
mainfrom
fix/cleanup-orphaned-images-on-path-removal

Conversation

@zanllp

@zanllp zanllp commented Feb 18, 2026

Copy link
Copy Markdown
Owner

When a folder is removed from the library, images under that folder are now properly cleaned up from the database if they are not covered by any other registered paths. This fixes the issue where Random Image would pull from folders that had been removed.

The cleanup logic checks if each image is still "owned" by any remaining scanned path before deletion, supporting nested path scenarios where a parent path may still contain the images.

Fixes #868

When a folder is removed from the library, images under that folder are
now properly cleaned up from the database if they are not covered by any
other registered paths. This fixes the issue where Random Image would
pull from folders that had been removed.

The cleanup logic checks if each image is still "owned" by any remaining
scanned path before deletion, supporting nested path scenarios where a
parent path may still contain the images.

Fixes #868

Co-Authored-By: Claude <noreply@anthropic.com>
@zanllp zanllp merged commit fb2a887 into main Feb 18, 2026
@zanllp zanllp deleted the fix/cleanup-orphaned-images-on-path-removal branch February 18, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Random Image pulls from folders that have been removed from the library

1 participant