immich-go icon indicating copy to clipboard operation
immich-go copied to clipboard

fix: `from-folder` discarding files as "extension not included"

Open niieani opened this issue 5 months ago • 5 comments

Fixes #1121

Summary

  • Default immich-go upload from-folder runs were discarding files as "extension not included" because SetIncludeTypeExtensions() always seeded the include list with only sidecar extensions. That regression arrived when the Cobra PreRun guard was removed in a recent refactor.
  • The same refactor stopped wiring the parsed filesystem slice and journal recorder into ImportFolderCmd, so browsing never saw any assets and logging nil-panicked.
  • Fixes the bugs, add regression tests, and confirm the CLI can scan fixtures again.

Key Changes

  1. Extension guard & tests
    • Skip SetIncludeTypeExtensions() work unless --include-type is set.
    • Added unit tests in internal/cliFlags/extensionList_test.go for both default and VIDEO modes.
  2. Folder runner wiring
    • Persist the fshelper.ParsePath result in ImportFolderCmd.fsyss before spinning workers.
    • Ensure the command attaches a fileevent.Recorder when app.Jnl() is nil, preventing nil-pointer panics while logging.

Verification

  • ran go test ./...
  • ran go run . upload from-folder test_folder --no-ui ... now correctly discovers files and no longer drops it as "extension not included" and uploads the files

niieani avatar Oct 13 '25 00:10 niieani

hey so we need to wait untill merged and new version availale to see it working? (sorry I don't get Git yet)

jeffreyskipl avatar Oct 13 '25 08:10 jeffreyskipl

Related to #1122 as well

Gustry avatar Oct 21 '25 15:10 Gustry

I am not that technical a person, I've just been uploading today into a new immich installation and getting a lot of discrded. So I read your explanation above, but I'm not understanding if that actually discarded all these pictures, or it just said it did. Do I have to re-do all my uploadsd? And can I, will there be hash issues? Using immich-go version 0.28.0.

1

harryfine avatar Oct 25 '25 20:10 harryfine

@simulot rebased on develop

niieani avatar Nov 18 '25 07:11 niieani

Hi, have you checked if the problem isn't already solved on the develop branch?

simulot avatar Nov 18 '25 07:11 simulot