Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: exclude EFFECTS and COLLAGE from duplicated images #111

Closed
gvillo opened this issue Dec 25, 2023 · 4 comments
Closed

feat: exclude EFFECTS and COLLAGE from duplicated images #111

gvillo opened this issue Dec 25, 2023 · 4 comments

Comments

@gvillo
Copy link

gvillo commented Dec 25, 2023

After running duplicate command I found there is no dry-run param, it would be nice to see a list of files that is going to be deleted before going one by one.

On the other hand, I found Google Photos is generating COLLAGE or EFFECTS files with the same filename with a +# suffix, e.g.

EFFECTS-20222506-102538.jpg
EFFECTS-20222506-102538+1.jpg
IMG_20171114_104841988-COLLAGE-20174814-104842.jpg
IMG_20171114_104841988-COLLAGE-20174814-104842+1.jpg
IMG_20180526_102517195-EFFECTS-20182526-102517.jpg
IMG_20180526_102517195-EFFECTS-20182526-102517+1.jpg

These files are not duplicates, they are all generated in the same time, same filename, but different images and I would like to keep those files. I might be wrong and this is not generated by Google Photos, but if we can provide some sort of exclude file list too it would be awesome.

@simulot
Copy link
Owner

simulot commented Dec 26, 2023

Thank you for this report.
I think the -dry-run is by default.

Maybe, I should add a way to get the list of duplicates.

The duplicate command intend was to eliminate the duplicates from the same photos due to the google photo compression. You have the original photo at full resolution coming from immich app, and the compressed version coming from the google takeout. immich server accepts both because their SHA1 hash are different. Files are stored in immich as IMAGE.jpg and IMAGE+1.jpg, and both have the same name in the UI. The duplicate command detects 2 files with the same date, and the same visible name, but with a different size as duplicate. The bigger file is kept.

So, you files are effectively detected as duplicates.

Your suggestion is good.
I can already exclude COLLAGE and EFFECTS from the duplicates.
Because anything else could exist, I must add the possibility to give custom patterns

@simulot simulot changed the title Duplicate Command Improvements feat: exclude EFFECTS and COLLAGE from duplicated images Dec 31, 2023
@simulot
Copy link
Owner

simulot commented Feb 10, 2024

@gvillo I have tested with collages done in GP web page. But they have slightly different names.

  • 20240209_155259-COLLAGE.jpg
  • 20240209_155259-COLLAGE~2.jpg

So the duplicate command doesn't detect them as duplicate.

How did you come with this situation?

@gvillo
Copy link
Author

gvillo commented Jun 18, 2024

@simulot sorry for the delay! the issue is when files are named something.jpg and something+1.jpg (not ~1 or ~2) the duplicated feature was treating them as duplicates. I didn't test it out newer versions of immich-go. I have to restore the deleted files in first place now 😅.

@simulot
Copy link
Owner

simulot commented Jun 18, 2024

Lot of changes done since them.
I close the issue.
Feel free to reopen it

@simulot simulot closed this as completed Jun 18, 2024
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

No branches or pull requests

2 participants