validation rule for callFunc operator

This commit is contained in:
Brahim Hadriche committed 2023-12-10 22:54:00 -05:00
1 parent 51966cb33f
commit 5982b5a75f
33 files changed
+64 -55

No files matched your search

@@ -186,20 +186,20 @@ function OnVideoPlayerStateChange() as void
if state = "finished"
if content = invalid
m.container@.watchedVideosClear(invalid)
m.container@.watchedVideosClear()
VideoUtils.CloseVideo()
return
end if
metadata = content.metadata
if metadata = invalid
m.container@.watchedVideosClear(invalid)
m.container@.watchedVideosClear()
VideoUtils.CloseVideo()
return
end if
if not PlayNext(metadata.recommendedVideos)
m.container@.watchedVideosClear(invalid)
m.container@.watchedVideosClear()
VideoUtils.CloseVideo()
end if
end if
@@ -226,7 +226,7 @@ function OnVideoPlayerStateChange() as void
end function
function PlayNext(recommendedVideos as object) as boolean
if m.playQueue@.PlayNextItem(invalid)
if m.playQueue@.PlayNextItem()
return true
end if
@@ -253,7 +253,7 @@ function PlayNextRecommendedVideo(recommendedVideos as object) as boolean
end if
if not m.container@.watchedVideosContain(videoId)
LogInfo(`Playing next recommended video (${videoId})`)
instance = m.invidious@.GetCurrentInstance(invalid)
instance = m.invidious@.GetCurrentInstance()
node = InvidiousContent.ToVideoContentNode(invalid, metadata, instance)
m.playQueue@.Play(node, -1)
return true
@@ -277,7 +277,7 @@ function OnkeyEvent(key as string, press as boolean) as boolean
end if
if key = "back"
m.container@.watchedVideosClear(invalid)
m.container@.watchedVideosClear()
VideoUtils.CloseVideo()
return true
end if