SponsorBlock job
This commit is contained in:
1 parent
115b457241
commit
9f5efb0ba7
4 files changed
+35
-31
No files matched your search
@@ -40,7 +40,7 @@ function Init()
|
||||
|
||||
' Checks if current RokuOS version has showUI field in Video node
|
||||
m.showUIEnabled = m.top.hasField("showUI")
|
||||
LogInfo(`Custom OK handler is ${m.showUIEnabled ? "enabled" : "disabled"}`)
|
||||
LogDebug(`Custom OK handler is ${m.showUIEnabled ? "enabled" : "disabled"}`)
|
||||
|
||||
' asyncStopSemantics available since Roku OS 12.5
|
||||
' It is set to true because stopping synchronously causes timeout and crash
|
||||
@@ -381,9 +381,9 @@ function OnClose()
|
||||
m.videoContentTask.cancel = true
|
||||
m.videoContentTask = invalid
|
||||
end if
|
||||
if m.sponsorBlockTask <> invalid
|
||||
m.sponsorBlockTask.cancel = true
|
||||
m.sponsorBlockTask = invalid
|
||||
if m.sponsorBlockSegmentsJob <> invalid
|
||||
m.sponsorBlockSegmentsJob.cancel = true
|
||||
m.sponsorBlockSegmentsJob = invalid
|
||||
end if
|
||||
|
||||
parent = m.top.getParent()
|
||||
@@ -538,7 +538,7 @@ function HandleOKPress() as boolean
|
||||
state = m.top.state
|
||||
uiVisible = m.top.trickPlaybar.visible
|
||||
isLive = IsLiveVideo()
|
||||
LogInfo(`Handling OK button: state = ${state}, uiVisible = ${uiVisible} isLive = ${isLive}`)
|
||||
LogDebug(`Handling OK button: state = ${state}, uiVisible = ${uiVisible} isLive = ${isLive}`)
|
||||
if state = "playing"
|
||||
if not uiVisible
|
||||
' Video is playing and UI is not visible, show it
|
||||
|
||||
Reference in new issue
Block a user