added deviceID as an arg
This commit is contained in:
parent
dd01f3b3b6
commit
d8a97c1257
@ -11,6 +11,7 @@ type args struct {
|
||||
BaseURL string `arg:"--base-url,required,env:BASE_URL" placeholder:"https://demo.immich.app"`
|
||||
APIKey string `arg:"--api-key,required,env:API_KEY" placeholder:"API_KEY"`
|
||||
UserdataDir string `arg:"--steam-userdata-dir,env:USERDATA_DIR" default:"$HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam/userdata"`
|
||||
DeviceID string `arg:"--device-id,env:DEVICE_ID" default:"steam-immich"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
@ -21,5 +22,6 @@ func main() {
|
||||
APIKey: args.APIKey,
|
||||
BaseURL: args.BaseURL,
|
||||
UserdataDir: os.ExpandEnv(args.UserdataDir),
|
||||
DeiveID: args.DeviceID,
|
||||
})
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ type Config struct {
|
||||
BaseURL string
|
||||
APIKey string
|
||||
UserdataDir string
|
||||
DeiveID string
|
||||
}
|
||||
|
||||
func Run(config Config) {
|
||||
@ -35,7 +36,7 @@ func Run(config Config) {
|
||||
for _, f := range files {
|
||||
fmt.Printf(" %s\n", f)
|
||||
|
||||
res, err := uploadToImmich(f, appid, config.BaseURL, config.APIKey, "steam-screenshot-test")
|
||||
res, err := uploadToImmich(f, appid, config.BaseURL, config.APIKey, config.DeiveID)
|
||||
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to upload to immich: %s", err)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user