simulot / immich-go

An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
GNU Affero General Public License v3.0
1.91k stars 55 forks source link

Bug: -exclude-file not working #471

Closed fOO223Fr closed 1 month ago

fOO223Fr commented 2 months ago

Command:

~/Downloads/immich-go_Linux_x86_64/immich-go -server=http://IP:PORT -key=FAKEKEY -log-level=INFO -log-file=./import.log upload -dry-run=TRUE -exclude-types=".db,.data,.iPhoto,.plist,.DS_Store" -exclude-files=iLifeShared/ -exclude-files=Database/ -exclude-files=Attachments/ -exclude-files=Auto\ Import/ -exclude-files=Thumbnails/ -exclude-files=Previews/ -exclude-files=BLOG/ -exclude-files=.* /PATH/TO/FOLDER/

Expectation: Below won't be scanned but it were:

  1. BLOG/*
  2. */Database/*

Actual: It is still scanned. 1.

 INFO | scanned image file | file="BLOG/2015/Loft Colours/._IMG_6167.JPG" time="2024-09-03T11:31.54 EDT"
 INFO | scanned image file | file="BLOG/2015/Loft Colours/._IMG_6172.jpg" time="2024-09-03T11:31.54 EDT"
 INFO | scanned image file | file="BLOG/2015/Loft Colours/IMG_6131.jpg" time="2024-09-03T11:31.54 EDT"
 INFO | scanned image file | file="BLOG/2015/Loft Colours/IMG_6132.jpg" time="2024-09-03T11:31.54 EDT"

2.

INFO | unsupported file | file="Photos Library 2.photoslibrary_prepare/Database/Versions/2014/08/15/20140815-145728/WcyhgsSIRWCw5TgfqdcjMg/._Version-1.apversion" reason="unsupported file type" time="2024-09-03T11:33.55 EDT"
 INFO | unsupported file | file="Photos Library 2.photoslibrary_prepare/Database/Versions/2014/08/15/20140815-145728/WcyhgsSIRWCw5TgfqdcjMg/Master.apmaster" reason="unsupported file type" time="2024-09-03T11:33.55 EDT"
AFumi39 commented 2 months ago

I've the same problem

simulot commented 2 months ago

@fOO223Fr

I did a similar test:

./immich-go -server=http://localhost:2283 -key=xxxx -log-file=test.log upload -dry-run -exclude-files=BLOG/* -exclude-files=*/Database/* "/test-data/#471 banned files"
 INFO | scanned image file | file=BLOG/PXL_20231006_063108407.jpg time="2024-09-08T03:08.35 CEST"
 INFO | discarded file | file=BLOG/PXL_20231006_063108407.jpg reason="banned file" time="2024-09-08T03:08.35 CEST"
 INFO | scanned image file | file=BLOG/PXL_20231006_063121958.jpg time="2024-09-08T03:08.35 CEST"
 INFO | discarded file | file=BLOG/PXL_20231006_063121958.jpg reason="banned file" time="2024-09-08T03:08.35 CEST"
 INFO | scanned image file | file=Folder/Database/PXL_20231006_063357420.jpg time="2024-09-08T03:08.35 CEST"
 INFO | discarded file | file=Folder/Database/PXL_20231006_063357420.jpg reason="banned file" time="2024-09-08T03:08.35 CEST"

Files are scanned... but discared

It's working.

simulot commented 1 month ago

I'll change the way for reporting those excluded files.

For the next major version