AOSSIE-Org / AOSSIE-Org/PictoPy

BUG: Same image gets indexed multiple times when directory contains symlinks/hardlinks

Đang mở
#1,181 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
283
Fork
679
Merge trung bình
7 ngày 2 giờ
Pull request đã merge (30 ngày)
3

Mô tả

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What happened?

### Describe the bug
When a library includes symbolic links (or hardlinks) to photos, PictoPy appears to index the same underlying image multiple times instead of treating it as one media item.

### Steps to reproduce
1. Create folder `A` with 20 images.
2. Create folder `B` containing symlinks to the same 20 images from `A` (or hardlinks).
3. Add both folders in PictoPy settings.
4. Start scan/indexing.

### Expected behavior
Each physical image should be indexed once (deduplicated by inode/path-resolve/hash strategy), with a single media record in the UI.

### Actual behavior
Duplicate entries appear for the same image content, and indexing/AI tagging runs repeatedly for linked copies.

### Impact
- Slower scans and higher CPU usage
- Duplicate thumbnails/search results
- Larger metadata DB than necessary

### Suggested fix
- Normalize file identity before insert (resolve symlink + stable file identity check).
- Add a unique constraint / duplicate guard in ingestion pipeline.
- Skip AI pipeline when file identity already exists.

### Record

- [x] I agree to follow this project's Code of Conduct

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.