From 1a60eee2520426dc3ee281f6f83138bfeb9656a1 Mon Sep 17 00:00:00 2001 From: KonradIT Date: Sat, 2 Sep 2023 15:37:15 +0200 Subject: [PATCH] Add HERO12 Black support --- README.md | 2 +- pkg/gopro/connect.go | 2 +- pkg/gopro/gopro.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c2ef186..51f0f16 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Right now the script supports these cameras: - HERO2 - HERO5 - MAX - Fusion - - HERO6 - HERO11 + - HERO6 - HERO12 - Insta360: X2, GO2, X3 - DJI: Osmo Pocket 1/2, DJI Osmo Action 1/2/3, Mavics, Minis - Android: All, but with Pixel 6 (Google Camera) specific fixes diff --git a/pkg/gopro/connect.go b/pkg/gopro/connect.go index b8d92e9..f449b6d 100644 --- a/pkg/gopro/connect.go +++ b/pkg/gopro/connect.go @@ -164,7 +164,7 @@ func ImportConnect(params utils.ImportParams) (*utils.Result, error) { root := strings.Split(gpInfo.Info.FirmwareVersion, ".")[0] switch root { - case "HD9", "H21", "H22": + case "HD9", "H21", "H22", "H23": verType = V2 gpTurbo = true case "HD6", "HD7", "HD8": diff --git a/pkg/gopro/gopro.go b/pkg/gopro/gopro.go index ca1e535..3ce7a8a 100644 --- a/pkg/gopro/gopro.go +++ b/pkg/gopro/gopro.go @@ -114,7 +114,7 @@ func (Entrypoint) Import(params utils.ImportParams) (*utils.Result, error) { params.Input = filepath.Join(params.Input, fmt.Sprint(DCIM)) switch root { - case "HD6", "HD7", "HD8", "H19", "HD9", "H21", "H22": + case "HD6", "HD7", "HD8", "H19", "HD9", "H21", "H22", "H23": result := importFromGoProV2(params) return &result, nil case "HD2", "HD3", "HD4", "HX", "HD5": @@ -533,7 +533,7 @@ func cleanVersion(s string) string { i := strings.LastIndex(s, ",") excludingLast := s[:i] + strings.Replace(s[i:], ",", "", 1) - if strings.Contains(s, "HERO10") || strings.Contains(s, "HERO11") { + if strings.Contains(s, `,"firmware version"`) { return strings.ReplaceAll(s, "\n", "") } return excludingLast