-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add new AutoArchive option #450
Conversation
cmd/upload/upload.go
Outdated
if app.AutoArchive && a.Archived { | ||
a.Archived = true | ||
app.Immich.UpdateAsset(ctx, ID, a) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can simplify this code.
The AssetUpload method of the immich client must be updated to handle the Archived flag:
Lines 125 to 127 in d58d266
// m.WriteField("isArchived", myBool(la.Archived).String()) // Not supported by the api | |
h := textproto.MIMEHeader{} |
Doing so, you'll save one call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add commit that mention the fix of the #448
@@ -161,6 +162,10 @@ func newCommand(ctx context.Context, common *cmd.SharedFlags, args []string, fsO | |||
"discard-archived", | |||
" google-photos only: Do not import archived photos (default FALSE)", myflag.BoolFlagFn(&app.DiscardArchived, false)) | |||
|
|||
cmd.BoolFunc( | |||
"auto-archive", | |||
" google-photos only: Automatically archive photos that are also archived in google photos (default FALSE)", myflag.BoolFlagFn(&app.AutoArchive, true)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description claims the default is false while it looks like the code defaults to true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I missed that when I updated the default to true
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [aquaproj/aqua-registry](https://togithub.com/aquaproj/aqua-registry) | minor | `v4.215.0` -> `v4.217.0` | | [charmbracelet/gum](https://togithub.com/charmbracelet/gum) | patch | `v0.14.3` -> `v0.14.4` | | [dandavison/delta](https://togithub.com/dandavison/delta) | patch | `0.18.0` -> `0.18.1` | | [sharkdp/fd](https://togithub.com/sharkdp/fd) | minor | `v10.1.0` -> `v10.2.0` | | [simulot/immich-go](https://togithub.com/simulot/immich-go) | minor | `0.21.2` -> `0.22.0` | --- ### Release Notes <details> <summary>aquaproj/aqua-registry (aquaproj/aqua-registry)</summary> ### [`v4.217.0`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.217.0) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.216.0...v4.217.0) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.217.0) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.217.0) | aquaproj/aqua-registry@v4.216.0...v4.217.0 ##### 🎉 New Packages [#​26217](https://togithub.com/aquaproj/aqua-registry/issues/26217) [1password/cli](https://developer.1password.com/docs/cli): 1Password CLI brings 1Password to your terminal. Sign in to 1Password CLI with your fingerprint, and securely access everything you need during development [@​shoppingjaws](https://togithub.com/shoppingjaws) ##### Fixes [#​26230](https://togithub.com/aquaproj/aqua-registry/issues/26230) apache/maven-mvnd: change the package type to http - [https://github.com/apache/maven-mvnd/issues/1109#issuecomment-2308500940](https://togithub.com/apache/maven-mvnd/issues/1109#issuecomment-2308500940) ### [`v4.216.0`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.216.0) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.215.1...v4.216.0) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.216.0) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.216.0) | aquaproj/aqua-registry@v4.215.1...v4.216.0 #### 🎉 Node.js Support You can can manage Node.js using aqua. https://aquaproj.github.io/docs/reference/nodejs-support #### 🎉 New Packages [#​26185](https://togithub.com/aquaproj/aqua-registry/issues/26185) [jmespath/jp](https://togithub.com/jmespath/jp): Command line interface to JMESPath - http://jmespath.org [@​ponkio-o](https://togithub.com/ponkio-o) [#​26002](https://togithub.com/aquaproj/aqua-registry/issues/26002) [nodejs/node](https://togithub.com/nodejs/node): Node.js JavaScript runtime #### Fixes [#​26211](https://togithub.com/aquaproj/aqua-registry/issues/26211) charmbracelet/glow: Regenerate the setting [#​26212](https://togithub.com/aquaproj/aqua-registry/issues/26212) charmbracelet/skate: Regenerate the setting ### [`v4.215.1`](https://togithub.com/aquaproj/aqua-registry/releases/tag/v4.215.1) [Compare Source](https://togithub.com/aquaproj/aqua-registry/compare/v4.215.0-1...v4.215.1) [Issues](https://togithub.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.215.1) | [Pull Requests](https://togithub.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.215.1) | aquaproj/aqua-registry@v4.215.0...v4.215.1 #### Fixed [#​26155](https://togithub.com/aquaproj/aqua-registry/issues/26155) astral-sh/uv: Add the command `uvx` [#​26139](https://togithub.com/aquaproj/aqua-registry/issues/26139) sachaos/viddy: Regenerate the setting Follow up changes of [viddy v1.0.0](https://togithub.com/sachaos/viddy/releases/tag/v1.0.0) </details> <details> <summary>charmbracelet/gum (charmbracelet/gum)</summary> ### [`v0.14.4`](https://togithub.com/charmbracelet/gum/releases/tag/v0.14.4) [Compare Source](https://togithub.com/charmbracelet/gum/compare/v0.14.3...v0.14.4) #### Au revoir, bugs This release fixes a buncha bugs and introduces a nice lil' quality-of-life feature. #### Changelog ##### New! - [`8422c49`](https://togithub.com/charmbracelet/gum/commit/8422c49018116886ae23356c2101c9f7076c865b): feat(filter): Add cyclic navigation ([#​483](https://togithub.com/charmbracelet/gum/issues/483)) ([@​piero-vic](https://togithub.com/piero-vic)) ##### Fixed - [`e095a91`](https://togithub.com/charmbracelet/gum/commit/e095a9142b740b08b2252df7c96e2c9571518751): fix(input): wrong height when using borders in the header ([@​caarlos0](https://togithub.com/caarlos0)) - [`d722a2f`](https://togithub.com/charmbracelet/gum/commit/d722a2f1b811581125911a7e1a61b4dc8e9a1ec7): fix: height 0 by default ([#​640](https://togithub.com/charmbracelet/gum/issues/640)) ([@​caarlos0](https://togithub.com/caarlos0)) - [`046a4d3`](https://togithub.com/charmbracelet/gum/commit/046a4d361eb12ffc0fd1b7ea5fec697ba1fe118e): fix: use 0 as default width ([#​634](https://togithub.com/charmbracelet/gum/issues/634)) ([@​caarlos0](https://togithub.com/caarlos0)) - [`9db5c7f`](https://togithub.com/charmbracelet/gum/commit/9db5c7fbbabad605e763925eeb9e24ec836616db): fix: select all keybindings ([#​639](https://togithub.com/charmbracelet/gum/issues/639)) ([@​caarlos0](https://togithub.com/caarlos0)) - [`96448e0`](https://togithub.com/charmbracelet/gum/commit/96448e08e575c5ccd3bdc7b30fc09c67775e2847): fix: show background style help ([#​641](https://togithub.com/charmbracelet/gum/issues/641)) ([@​caarlos0](https://togithub.com/caarlos0)) - ##### Deps - [`dd5aa97`](https://togithub.com/charmbracelet/gum/commit/dd5aa97c4a4592a719e02e67f2c6b5d0321b7f86): feat(deps): bump github.com/charmbracelet/bubbles ([#​654](https://togithub.com/charmbracelet/gum/issues/654)) ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`1a91d33`](https://togithub.com/charmbracelet/gum/commit/1a91d335fa67b4b90793231fb2b55c579cbfdaaa): feat(deps): bump github.com/charmbracelet/glamour from 0.7.0 to 0.8.0 ([#​646](https://togithub.com/charmbracelet/gum/issues/646)) ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`2ee90c8`](https://togithub.com/charmbracelet/gum/commit/2ee90c889394e3e3a8e022f05097b0f643bf7c58): feat(deps): bump github.com/charmbracelet/lipgloss ([#​655](https://togithub.com/charmbracelet/gum/issues/655)) ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`f55c314`](https://togithub.com/charmbracelet/gum/commit/f55c3145580caf4c094f5b04e01d08b0ca155127): fix(deps): update huh ([@​caarlos0](https://togithub.com/caarlos0)) ##### Docs - [`7e56d57`](https://togithub.com/charmbracelet/gum/commit/7e56d57478d14e2a5378d57f0c5f45e74bbadf7d): docs: update install instructions ([@​caarlos0](https://togithub.com/caarlos0)) ##### Other stuff - [`19a93b0`](https://togithub.com/charmbracelet/gum/commit/19a93b08b97e58ba22b1276da2fcfc8f4a82c7f1): refactor(input): simplify echoMode ([@​caarlos0](https://togithub.com/caarlos0)) *** <details> <summary>Verifying the artifacts</summary> First, download the [`checksums.txt` file](https://togithub.com/charmbracelet/gum/releases/download/0.14.4/checksums.txt), for example, with `wget`: ```bash wget 'https://github.com/charmbracelet/gum/releases/download/v0.14.4/checksums.txt' ``` Then, verify it using [`cosign`](https://togithub.com/sigstore/cosign): ```bash cosign verify-blob \ --certificate-identity 'https://github.com/charmbracelet/meta/.github/workflows/goreleaser.yml@refs/heads/main' \ --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \ --cert 'https://github.com/charmbracelet/gum/releases/download/v0.14.4/checksums.txt.pem' \ --signature 'https://github.com/charmbracelet/gum/releases/download/v0.14.4/checksums.txt.sig' \ ./checksums.txt ``` If the output is `Verified OK`, you can safely use it to verify the checksums of other artifacts you downloaded from the release using `sha256sum`: ```bash sha256sum --ignore-missing -c checksums.txt ``` Done! You artifacts are now verified! </details> <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@​charm), or on [Discord](https://charm.sh/chat). </details> <details> <summary>dandavison/delta (dandavison/delta)</summary> ### [`v0.18.1`](https://togithub.com/dandavison/delta/releases/tag/0.18.1) [Compare Source](https://togithub.com/dandavison/delta/compare/0.18.0...0.18.1) This patch release fixes an issue with `delta --version` that was causing problems downstream ([https://github.com/dandavison/delta/issues/1818](https://togithub.com/dandavison/delta/issues/1818)). #### What's Changed - Add hyperlinks section to manual by [@​dandavison](https://togithub.com/dandavison) in [https://github.com/dandavison/delta/pull/1816](https://togithub.com/dandavison/delta/pull/1816) - Added `platypus` theme by [@​sarpuser](https://togithub.com/sarpuser) in [https://github.com/dandavison/delta/pull/1819](https://togithub.com/dandavison/delta/pull/1819) - Don't use pager for --version by [@​dandavison](https://togithub.com/dandavison) in [https://github.com/dandavison/delta/pull/1824](https://togithub.com/dandavison/delta/pull/1824) #### New Contributors - [@​sarpuser](https://togithub.com/sarpuser) made their first contribution in [https://github.com/dandavison/delta/pull/1819](https://togithub.com/dandavison/delta/pull/1819) **Full Changelog**: dandavison/delta@0.18.0...0.18.1 </details> <details> <summary>sharkdp/fd (sharkdp/fd)</summary> ### [`v10.2.0`](https://togithub.com/sharkdp/fd/releases/tag/v10.2.0) [Compare Source](https://togithub.com/sharkdp/fd/compare/v10.1.0...v10.2.0) #### Features - Add --hyperlink option to add OSC 8 hyperlinks to output #### Changes - Build windows releases with rust 1.77 so windows 7 is still supported - Deb packages now include symlink for fdfind to be more consistent with official packages #### New Contributors - [@​bryanhonof](https://togithub.com/bryanhonof) made their first contribution in [https://github.com/sharkdp/fd/pull/1574](https://togithub.com/sharkdp/fd/pull/1574) - [@​JCHacking](https://togithub.com/JCHacking) made their first contribution in [https://github.com/sharkdp/fd/pull/1602](https://togithub.com/sharkdp/fd/pull/1602) - [@​RossSmyth](https://togithub.com/RossSmyth) made their first contribution in [https://github.com/sharkdp/fd/pull/1596](https://togithub.com/sharkdp/fd/pull/1596) **Full Changelog**: sharkdp/fd@v10.1.0...v10.2.0 </details> <details> <summary>simulot/immich-go (simulot/immich-go)</summary> ### [`v0.22.0`](https://togithub.com/simulot/immich-go/releases/tag/0.22.0) [Compare Source](https://togithub.com/simulot/immich-go/compare/0.21.2...0.22.0) Many thanks to [@​maybeanerd](https://togithub.com/maybeanerd) for their meticulous proofreading of the documentation files. ##### New feature: Use the full image path as album name Thanks to [@​giejay](https://togithub.com/giejay) for their contribution When the `-use-full-path-album-name` option is enabled, photos are added to a new album named after their full file path. The path separator can be replaced using the `-album-name-path-separator=CHAR` ##### New feature: google photos archived photos are imported as immich archive by default Thanks to [@​Alex1607](https://togithub.com/Alex1607) for their contribution Use the option `-auto-archive=FALSE` to disable this feature. ##### What's Changed - fix Takeout zip is unsupported file type [#​357](https://togithub.com/simulot/immich-go/issues/357) by [@​simulot](https://togithub.com/simulot) in [https://github.com/simulot/immich-go/pull/415](https://togithub.com/simulot/immich-go/pull/415) - docs: fix typos in readme by [@​maybeanerd](https://togithub.com/maybeanerd) in [https://github.com/simulot/immich-go/pull/421](https://togithub.com/simulot/immich-go/pull/421) - Program errors out due to no ping API response despite API responding by [@​simulot](https://togithub.com/simulot) in [https://github.com/simulot/immich-go/pull/431](https://togithub.com/simulot/immich-go/pull/431) - remove "GetJobs" call from API traces by [@​simulot](https://togithub.com/simulot) in [https://github.com/simulot/immich-go/pull/442](https://togithub.com/simulot/immich-go/pull/442) - Add support for -use-full-path-album-name to be able to use the full path to the file as album name/title by [@​giejay](https://togithub.com/giejay) in [https://github.com/simulot/immich-go/pull/444](https://togithub.com/simulot/immich-go/pull/444) - Documentation-update by [@​simulot](https://togithub.com/simulot) in [https://github.com/simulot/immich-go/pull/446](https://togithub.com/simulot/immich-go/pull/446) - Add new AutoArchive option by [@​Alex1607](https://togithub.com/Alex1607) in [https://github.com/simulot/immich-go/pull/450](https://togithub.com/simulot/immich-go/pull/450) - Update README.md, google-takeout.md, and motivation.md by [@​aaronjrodrigues](https://togithub.com/aaronjrodrigues) in [https://github.com/simulot/immich-go/pull/454](https://togithub.com/simulot/immich-go/pull/454) ##### New Contributors - [@​maybeanerd](https://togithub.com/maybeanerd) made their first contribution in [https://github.com/simulot/immich-go/pull/421](https://togithub.com/simulot/immich-go/pull/421) - [@​giejay](https://togithub.com/giejay) made their first contribution in [https://github.com/simulot/immich-go/pull/444](https://togithub.com/simulot/immich-go/pull/444) - [@​Alex1607](https://togithub.com/Alex1607) made their first contribution in [https://github.com/simulot/immich-go/pull/450](https://togithub.com/simulot/immich-go/pull/450) **Full Changelog**: simulot/immich-go@0.21.0...0.22.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/scottames/dots). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
Added a new AutoArchive option which when enabled will automatically archive images in immich which are also archived in google photos