From 2b56ed5f8e34f88f9cf0e9d0d5313a901f7cc369 Mon Sep 17 00:00:00 2001 From: Jinho Kim Date: Sun, 29 Jan 2023 19:52:10 -0500 Subject: [PATCH] remove "then" from if statements The project should validate now --- components/captionTask.brs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/captionTask.brs b/components/captionTask.brs index 73204633..2718e5db 100644 --- a/components/captionTask.brs +++ b/components/captionTask.brs @@ -18,7 +18,7 @@ end sub sub fetchCaption() re = CreateObject("roRegex", "(http.*?\.vtt)", "s") url = re.match(m.top.url)[0] - if url <> invalid then + if url <> invalid m.reader.setUrl(url) text = m.reader.GetToString() m.captionList = parseVTT(text) @@ -30,11 +30,11 @@ end sub sub updateCaption () ' Stop updating captions if the video isn't playing - if m.top.playerState = "playing" then + if m.top.playerState = "playing" m.top.currentPos = m.top.currentPos + 100 tmp = [] for each entry in m.captionList - if entry["start"] <= m.top.currentPos and m.top.currentPos <= entry["end"] then + if entry["start"] <= m.top.currentPos and m.top.currentPos <= entry["end"] label = CreateObject("roSGNode", "Label") label.text = entry["text"] label.font = m.font @@ -80,4 +80,4 @@ function parseVTT(text) end for end for return captionList -end function \ No newline at end of file +end function