Fixed preview streaming (forgot to connect)

This commit is contained in:
Jonas Köritz 2019-08-29 14:08:11 +02:00
parent 4f0f595aa0
commit 3006672e43
3 changed files with 24 additions and 3 deletions

View file

@ -46,6 +46,12 @@ func main() {
bufio.NewReader(os.Stdin).ReadBytes('\n')
},
PreRun: func(cmd *cobra.Command, args []string) {
camera = connectAndLogin(net.ParseIP(args[0]), int(port), username, password, verbose)
},
PostRun: func(cmd *cobra.Command, args []string) {
camera.Disconnect()
},
}
rootCmd.PersistentFlags().Int16VarP(&port, "port", "P", 6666, "Specify an alternative camera port to connect to")