From 343dd10e8f127058bc8f5d0fafa5a976a44754e1 Mon Sep 17 00:00:00 2001 From: Matthias Hochgatterer Date: Mon, 10 Dec 2018 22:10:42 +0100 Subject: [PATCH] Add data_dir argument --- cmd/hkcam/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/hkcam/main.go b/cmd/hkcam/main.go index 19b9dd2..16663f9 100644 --- a/cmd/hkcam/main.go +++ b/cmd/hkcam/main.go @@ -41,6 +41,7 @@ func main() { } var multiStream *bool = flag.Bool("multi_stream", true, "Allow mutliple clients to view the stream simultaneously") + var dataDir *string = flag.String("data_dir", "", "Path to data directory") var verbose *bool = flag.Bool("verbose", false, "Verbose logging") flag.Parse() @@ -52,7 +53,7 @@ func main() { switchInfo := accessory.Info{Name: "Camera"} cam := accessory.NewCamera(switchInfo) - t, err := hc.NewIPTransport(hc.Config{}, cam.Accessory) + t, err := hc.NewIPTransport(hc.Config{StoragePath: *dataDir}, cam.Accessory) if err != nil { log.Info.Panic(err) }