Skip to content

Commit 310cab3

Browse files
hugo-sacisimulot
authored andcommitted
feat: Add for from-immich and from-google-photos (#16)
Add the --include-type flag for the from-immich and from-google-photos options. Enables it for both the upload and archive command. Closes #15
1 parent 5e2f010 commit 310cab3

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

adapters/fromimmich/options.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ import (
99
)
1010

1111
type FromImmichFlags struct {
12-
DateRange cliflags.DateRange // get assets only within this date range (fromat: YYYY-MM-DD,YYYY-MM-DD)
13-
Albums []string // get assets only from those albums
14-
Tags []string // get assets only with those tags
15-
WithArchived bool // get archived assets too
16-
WithTrashed bool // get trashed assets too
17-
Favorite bool // get only favorite assets
18-
MinimalRating int // get only assets with a rating greater or equal to this value
19-
Make string // get only assets with this make
20-
Model string // get only assets with this model
21-
client app.Client // client to use for the import
12+
DateRange cliflags.DateRange // get assets only within this date range (fromat: YYYY-MM-DD,YYYY-MM-DD)
13+
Albums []string // get assets only from those albums
14+
Tags []string // get assets only with those tags
15+
WithArchived bool // get archived assets too
16+
WithTrashed bool // get trashed assets too
17+
Favorite bool // get only favorite assets
18+
MinimalRating int // get only assets with a rating greater or equal to this value
19+
Make string // get only assets with this make
20+
Model string // get only assets with this model
21+
client app.Client // client to use for the import
22+
InclusionFlags cliflags.InclusionFlags // controls the file extensions to be included in the import process.
2223
}
2324

2425
func (o *FromImmichFlags) AddFromImmichFlags(cmd *cobra.Command, parent *cobra.Command) {
@@ -37,4 +38,5 @@ func (o *FromImmichFlags) AddFromImmichFlags(cmd *cobra.Command, parent *cobra.C
3738
cmd.Flags().BoolVar(&o.client.APITrace, "from-api-trace", false, "Enable trace of api calls")
3839
cmd.Flags().BoolVar(&o.client.SkipSSL, "from-skip-verify-ssl", false, "Skip SSL verification")
3940
cmd.Flags().DurationVar(&o.client.ClientTimeout, "from-client-timeout", 5*time.Minute, "Set server calls timeout")
41+
cliflags.AddInclusionFlags(cmd, &o.InclusionFlags)
4042
}

0 commit comments

Comments
 (0)