Remove todo, rename registry key
This commit is contained in:
1 parent
1b4d0b5f90
commit
4f22353d14
7 files changed
+6
-23
No files matched your search
@@ -10,7 +10,6 @@
|
||||
<field id="focus" type="boolean" alwaysNotify="true" />
|
||||
</interface>
|
||||
<children>
|
||||
<!-- TODO: Fix layout where viewCount label disappears if title is two lines -->
|
||||
<RowList
|
||||
itemComponentName="VideoRowCell"
|
||||
id="rowList"
|
||||
|
||||
@@ -38,7 +38,6 @@ end function
|
||||
|
||||
function OnNavBarEscape()
|
||||
index = m.navBar.escapeIndex
|
||||
'TODO: search at index 0
|
||||
if index = 0
|
||||
m.searchScreen.focus = true
|
||||
else if index = 1
|
||||
@@ -53,7 +52,6 @@ function OnNavIndexChange() as void
|
||||
if index = -1
|
||||
return
|
||||
end if
|
||||
'TODO: search at index 0
|
||||
if index = 0
|
||||
m.searchScreen.visible = true
|
||||
m.homeGridScreen.visible = false
|
||||
|
||||
@@ -49,7 +49,6 @@ namespace Http
|
||||
router.GenerateDirectoryListing(path, router, request, response)
|
||||
return true
|
||||
else if stat.type = "file"
|
||||
' TODO: implement
|
||||
response.mimetype = WebUtils.MimeType(decoded_uri)
|
||||
response.fileLength = stat.size
|
||||
router.log.info("uri=" + uri + ", target=" + path + ", content-type=" + response.mimetype + ", content-length=" + Stri(response.fileLength).trim())
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Http
|
||||
' Token is encoded twice for some reason
|
||||
token = WebUtils.UrlUnescape(components["token"]).DecodeUriComponent()
|
||||
print(`Got Token: ${token}`)
|
||||
RegistryUtils.Write("token", token)
|
||||
RegistryUtils.Write("invidious_token", token)
|
||||
server.task.top.login = true
|
||||
end if
|
||||
response.Redirect("/index.html?tab=settings")
|
||||
|
||||
@@ -104,7 +104,6 @@ namespace Invidious
|
||||
end function
|
||||
|
||||
function Search(q as string, args = invalid as dynamic) as object
|
||||
'page = invalid as integer, sort_by = invalid as RokuYoutube.Models.Invidious.SearchFilter.SortBy, date = invalid as RokuYoutube.Models.Invidious.SearchFilter.Date, duration = invalid as RokuYoutube.Models.Invidious.SearchFilter.Duration, _type = invalid as RokuYoutube.Models.Invidious.SearchFilter.SearchType, features = invalid as RokuYoutube.Models.Invidious.SearchFilter.Features) as object
|
||||
url = `${Invidious.API_URL}${Invidious.SEARCH_ENDPOINT}`
|
||||
|
||||
_args = Invidious.DefaultArgs()
|
||||
@@ -155,7 +154,7 @@ namespace Invidious
|
||||
end function
|
||||
|
||||
function GetAuthenticationHeaders() as object
|
||||
token = RegistryUtils.Read("token")
|
||||
token = RegistryUtils.Read("invidious_token")
|
||||
if token = invalid
|
||||
return invalid
|
||||
end if
|
||||
@@ -180,7 +179,7 @@ namespace Invidious
|
||||
response = Requests().get(url, args)
|
||||
|
||||
if response.statuscode = 403
|
||||
RegistryUtils.Delete("token")
|
||||
RegistryUtils.Delete("invidious_token")
|
||||
end if
|
||||
if response.statuscode = 200
|
||||
return response.json.videos
|
||||
@@ -204,7 +203,7 @@ namespace Invidious
|
||||
response = Requests().get(url, args)
|
||||
|
||||
if response.statuscode = 403
|
||||
RegistryUtils.Delete("token")
|
||||
RegistryUtils.Delete("invidious_token")
|
||||
end if
|
||||
if response.statuscode = 200
|
||||
return response.json
|
||||
|
||||
@@ -74,7 +74,7 @@ class InvidiousService
|
||||
end function
|
||||
|
||||
function GetAuthenticationHeaders() as object
|
||||
token = RegistryUtils.Read("token")
|
||||
token = RegistryUtils.Read("invidious_token")
|
||||
if token = invalid
|
||||
return invalid
|
||||
end if
|
||||
@@ -118,7 +118,7 @@ class InvidiousService
|
||||
if response.statuscode = 403
|
||||
print(`Server responded with 403: ${response.text}`)
|
||||
print("deleting token...")
|
||||
RegistryUtils.Delete("token")
|
||||
RegistryUtils.Delete("invidious_token")
|
||||
end if
|
||||
end function
|
||||
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
'******************************************************
|
||||
'Determine if the UI is displayed in SD or HD mode
|
||||
'******************************************************
|
||||
function IsHD() as boolean
|
||||
di = CreateObject("roDeviceInfo")
|
||||
if di.GetDisplayMode() = "720p"
|
||||
return true
|
||||
end if
|
||||
return false
|
||||
end function
|
||||
|
||||
function GetLocalIpAddress() as string
|
||||
if m.ipAddress = invalid or m.ipAddress = ""
|
||||
di = CreateObject("roDeviceInfo")
|
||||
@@ -59,5 +48,4 @@ function GetDeviceInfo() as object
|
||||
}
|
||||
end if
|
||||
return m.deviceInfo
|
||||
|
||||
end function
|
||||
Reference in new issue
Block a user