Bug fix
This commit is contained in:
1 parent
7f7564f66b
commit
cf74af04ec
5 files changed
+15
-12
No files matched your search
+2
-1
@@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Fixed
|
### Fixed
|
||||||
- Bug where app freezes if metadata fails to fetch
|
- Bug where app freezes if metadata fails to fetch
|
||||||
- A bug where SponsorBlock returning videoDuration of zero causes the app to hang
|
- Bug where SponsorBlock returning videoDuration of zero causes the app to hang
|
||||||
|
- Bug where app would lose focus when casting from web app
|
||||||
|
|
||||||
## [0.5.0] - 2022-12-02
|
## [0.5.0] - 2022-12-02
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ function Init()
|
|||||||
m.rowList = m.top.FindNode("rowList")
|
m.rowList = m.top.FindNode("rowList")
|
||||||
m.top.ObserveField("rowItemSelected", "OnHomeGridScreenVideoSelected")
|
m.top.ObserveField("rowItemSelected", "OnHomeGridScreenVideoSelected")
|
||||||
m.top.ObserveField("focus", "OnFocusChange")
|
m.top.ObserveField("focus", "OnFocusChange")
|
||||||
m.top.ObserveField("playvideo", "OnPlayVideoCommand")
|
|
||||||
m.top.ObserveField("refresh", "OnRefresh")
|
m.top.ObserveField("refresh", "OnRefresh")
|
||||||
|
|
||||||
m.top.focus = true
|
m.top.focus = true
|
||||||
@@ -114,11 +113,6 @@ function OnHomeGridScreenVideoSelected(event as object) as void
|
|||||||
PlayVideo(videoId, m.top)
|
PlayVideo(videoId, m.top)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnPlayVideoCommand()
|
|
||||||
videoId = m.top.playvideo
|
|
||||||
PlayVideo(videoId)
|
|
||||||
end function
|
|
||||||
|
|
||||||
function OnkeyEvent(key as string, press as boolean) as boolean
|
function OnkeyEvent(key as string, press as boolean) as boolean
|
||||||
if press = false
|
if press = false
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
<field id="jumpToRowItem" type="intarray" alias="RowList.jumpToRowItem" />
|
<field id="jumpToRowItem" type="intarray" alias="RowList.jumpToRowItem" />
|
||||||
<field id="escape" type="string" alwaysNotify="true" />
|
<field id="escape" type="string" alwaysNotify="true" />
|
||||||
<field id="focus" type="boolean" alwaysNotify="true" />
|
<field id="focus" type="boolean" alwaysNotify="true" />
|
||||||
<field id="playvideo" type="string" alwaysNotify="true" />
|
|
||||||
<field id="refresh" type="boolean" alwaysNotify="true" />
|
<field id="refresh" type="boolean" alwaysNotify="true" />
|
||||||
</interface>
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ function Init()
|
|||||||
m.navBar.ObserveField("escapeIndex", "OnNavBarEscape")
|
m.navBar.ObserveField("escapeIndex", "OnNavBarEscape")
|
||||||
m.navBar.ObserveField("focusIndex", "OnNavIndexChange")
|
m.navBar.ObserveField("focusIndex", "OnNavIndexChange")
|
||||||
|
|
||||||
|
m.currentFocued = m.homeGridScreen
|
||||||
|
|
||||||
InitWebServer()
|
InitWebServer()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -42,19 +44,23 @@ end function
|
|||||||
function OnSearchScreenEscape()
|
function OnSearchScreenEscape()
|
||||||
m.navBar.SetFocus(true)
|
m.navBar.SetFocus(true)
|
||||||
m.navBar.focusIndex = 0
|
m.navBar.focusIndex = 0
|
||||||
|
m.currentFocued = m.navBar
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnHomeGridScreenEscape()
|
function OnHomeGridScreenEscape()
|
||||||
m.navBar.SetFocus(true)
|
m.navBar.SetFocus(true)
|
||||||
m.navBar.focusIndex = 1
|
m.navBar.focusIndex = 1
|
||||||
|
m.currentFocued = m.navBar
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function OnNavBarEscape()
|
function OnNavBarEscape()
|
||||||
index = m.navBar.escapeIndex
|
index = m.navBar.escapeIndex
|
||||||
if index = 0
|
if index = 0
|
||||||
m.searchScreen.focus = true
|
m.searchScreen.focus = true
|
||||||
|
m.currentFocued = m.searchScreen
|
||||||
else if index = 1
|
else if index = 1
|
||||||
m.homeGridScreen.focus = true
|
m.homeGridScreen.focus = true
|
||||||
|
m.currentFocued = m.homeGridScreen
|
||||||
else if index = 2
|
else if index = 2
|
||||||
m.settingsScreen.focus = true
|
m.settingsScreen.focus = true
|
||||||
end if
|
end if
|
||||||
@@ -86,7 +92,8 @@ end function
|
|||||||
|
|
||||||
function OnWebServerCommand()
|
function OnWebServerCommand()
|
||||||
if m.serverTask.command.StartsWith("play:")
|
if m.serverTask.command.StartsWith("play:")
|
||||||
PlayVideo(m.serverTask.command.Mid(5))
|
sender = m.videoContainer.sender ?? m.currentFocued
|
||||||
|
PlayVideo(m.serverTask.command.Mid(5), sender)
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -104,13 +111,15 @@ end function
|
|||||||
function LaunchArgumentsReceived()
|
function LaunchArgumentsReceived()
|
||||||
? "LaunchArgumentsReceived" m.top.launchArgs
|
? "LaunchArgumentsReceived" m.top.launchArgs
|
||||||
if m.top.launchArgs <> invalid and m.top.launchArgs.contentId <> invalid
|
if m.top.launchArgs <> invalid and m.top.launchArgs.contentId <> invalid
|
||||||
PlayVideo(m.top.launchArgs.contentId, m.homeGridScreen)
|
sender = m.videoContainer.sender ?? m.currentFocued
|
||||||
|
PlayVideo(m.top.launchArgs.contentId, sender)
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function InputArgumentsReceived()
|
function InputArgumentsReceived()
|
||||||
? "InputArgumentsReceived" m.top.inputArgs
|
? "InputArgumentsReceived" m.top.inputArgs
|
||||||
if m.top.inputArgs <> invalid and m.top.inputArgs.contentId <> invalid
|
if m.top.inputArgs <> invalid and m.top.inputArgs.contentId <> invalid
|
||||||
PlayVideo(m.top.inputArgs.contentId)
|
sender = m.videoContainer.sender ?? m.currentFocued
|
||||||
|
PlayVideo(m.top.inputArgs.contentId, sender)
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
@@ -2,7 +2,7 @@ import "pkg:/source/services/Invidious.bs"
|
|||||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||||
import "pkg:/source/roku_modules/rokupromise/Promise.brs"
|
import "pkg:/source/roku_modules/rokupromise/Promise.brs"
|
||||||
|
|
||||||
function PlayVideo(videoId as string, sender = invalid as object)
|
function PlayVideo(videoId as string, sender as object)
|
||||||
width = 1280
|
width = 1280
|
||||||
height = 720
|
height = 720
|
||||||
translation = [0.0, 0.0]
|
translation = [0.0, 0.0]
|
||||||
|
|||||||
Reference in new issue
Block a user