From 4473edf393d9c11499492fcec1e2b5c50624608d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=B3=93=E9=93=AE?= Date: Tue, 2 Jul 2024 21:22:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E7=AB=AF=E5=88=B0=E7=AB=AF=E8=AF=86=E5=88=AB=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=88=B3=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hrp/pkg/uixt/live_e2e.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/hrp/pkg/uixt/live_e2e.go b/hrp/pkg/uixt/live_e2e.go index 58a00913..cda4d72c 100644 --- a/hrp/pkg/uixt/live_e2e.go +++ b/hrp/pkg/uixt/live_e2e.go @@ -62,11 +62,11 @@ func (ete *EndToEndDelay) getCurrentLiveTime(utcTime time.Time) error { // filter ocr texts with time format var liveTimeTexts []string for _, ocrText := range ocrTexts { - if len(ocrText.Text) < 10 || strings.Contains(ocrText.Text, ":") { + if len(ocrText.Text) < 13 || strings.Contains(ocrText.Text, ":") { continue } // exclude digit(s) recognized as letter(s) - _, errParseInt := strconv.ParseInt(ocrText.Text[:10], 10, 64) + _, errParseInt := strconv.ParseInt(ocrText.Text[:13], 10, 64) if errParseInt != nil { continue } @@ -81,11 +81,6 @@ func (ete *EndToEndDelay) getCurrentLiveTime(utcTime time.Time) error { return nil } - if len(liveTimeText) < 13 { - for (13 - len(liveTimeText)) > 0 { - liveTimeText += "0" - } - } liveTimeInt, err := strconv.Atoi(liveTimeText) if err != nil { liveTimeInt = 0