Merge branch 'master' into misc-scope-fixes

This commit is contained in:
Neil Burrows 2021-01-31 19:11:38 +00:00 committed by GitHub
commit c233e58a55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 43 additions and 25 deletions

View File

@ -3,7 +3,7 @@
<interface>
<field id="itemsPerRow" type="int" />
<field id="rowsPerPage" type="int" value="2" />
<field id="objects" type="associativearray" onChange="setupRows" />
<field id="objects" type="assocarray" onChange="setupRows" />
<field id="escapeButton" type="string" alwaysNotify="true" />
</interface>
<script type="text/brightscript" uri="ItemGrid.brs" />

View File

@ -25,7 +25,7 @@
</children>
<interface>
<field id="buttons" type="nodearray" />
<field id="options" type="associativearray" onChange="optionsSet" />
<field id="options" type="assocarray" onChange="optionsSet" />
<field id="view" type="string" />
<field id="sortField" type="string" value="SortName" />

View File

@ -6,7 +6,7 @@
<field id="startIndex" type="integer" value="0" />
<field id="itemType" type="string" value="" />
<field id="limit" type="integer" value="36" />
<field id="metadata" type="associativearray" />
<field id="metadata" type="assocarray" />
<field id="sortField" type="string" value="SortName" />
<field id="sortAscending" type="boolean" value="true" />
<field id="recursive" type="boolean" value="true" />

View File

@ -7,7 +7,7 @@
<field id="Subtitles" type="array" />
<field id="SelectedSubtitle" type="integer" />
<field id="captionMode" type="string" />
<field id="transcodeParams" type="associativearray" />
<field id="transcodeParams" type="assocarray" />
<field id="container" type="string" />
<field id="directPlaySupported" type="boolean" />
<field id="decodeAudioSupported" type="boolean" />

View File

@ -6,7 +6,7 @@
<interface>
<field id="collectionId" type="string" onChange="collectionIdChanged" />
<field id="selectedItem" type="node" alwaysNotify="true" />
<field id="objects" type="associativearray" onChange="setupRows" />
<field id="objects" type="assocarray" onChange="setupRows" />
</interface>
<script type="text/brightscript" uri="CollectionDetail.brs" />
</component>

View File

@ -3,7 +3,7 @@
<interface>
<field id="id" type="string" />
<field id="title" type="string" />
<field id="json" type="associativearray" onChange="setFields" />
<field id="json" type="assocarray" onChange="setFields" />
</interface>
<script type="text/brightscript" uri="AlbumData.brs" />
</component>

View File

@ -8,7 +8,7 @@
<field id="posterURL" type="string" />
<field id="widePosterURL" type="string" />
<field id="type" type="string" />
<field id="json" type="associativearray" onChange="setData" />
<field id="json" type="assocarray" onChange="setData" />
<field id="collectionType" type="string" />
<field id="imageWidth" type="integer" value="464" />
<field id="usePoster" type="bool" value="false" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<component name="ImageData" extends="ContentNode">
<interface>
<field id="json" type="associativearray" onChange="setFields" />
<field id="json" type="assocarray" onChange="setFields" />
<field id="imagetype" type="string" />
<field id="size" type="string" />
<field id="height" type="integer" />

View File

@ -8,6 +8,6 @@
<field id="SubTitle" type="string" value="" />
<field id="iconUrl" type="string" value="" />
<field id="Type" type="string" value="" />
<field id="json" type="associativearray" onChange="setFields" />
<field id="json" type="assocarray" onChange="setFields" />
</interface>
</component>

View File

@ -3,7 +3,7 @@
<interface>
<field id="image" type="node" onChange="setPoster" />
<field id="movieID" type="string" />
<field id="seasons" type="associativearray" />
<field id="seasons" type="assocarray" />
<field id="container" type="string" />
</interface>
<script type="text/brightscript" uri="MovieData.brs" />

View File

@ -6,7 +6,7 @@
<field id="title" type="string" />
<field id="image" type="node" onChange="setPoster" />
<field id="posterURL" type="string" />
<field id="json" type="associativearray" onChange="setFields" />
<field id="json" type="assocarray" onChange="setFields" />
</interface>
<script type="text/brightscript" uri="SearchData.brs" />
</component>

View File

@ -2,8 +2,8 @@
<component name="SeriesData" extends="JFContentItem">
<interface>
<field id="overview" type="string" />
<field id="seasons" type="associativearray" />
<field id="nextup" type="associativearray" />
<field id="seasons" type="assocarray" />
<field id="nextup" type="assocarray" />
<field id="image" type="node" onChange="setPoster" />
</interface>
<script type="text/brightscript" uri="SeriesData.brs" />

View File

@ -9,7 +9,8 @@
<field id="seasonID" type="string" />
<field id="overview" type="string" />
<field id="type" type="string" value="Episode" />
<field id="json" type="associativearray" onChange="setFields" />
<field id="json" type="assocarray" onChange="setFields" />
<function name="loadSeasons" />
</interface>
<script type="text/brightscript" uri="TVEpisodeData.brs" />
</component>

View File

@ -6,7 +6,8 @@
<field id="image" type="node" onChange="setPoster" />
<field id="posterURL" type="string" />
<field id="overview" type="string" />
<field id="json" type="associativearray" onChange="setFields" />
<field id="json" type="assocarray" onChange="setFields" />
<function name="getPoster" />
</interface>
<script type="text/brightscript" uri="TVSeasonData.brs" />
</component>

View File

@ -5,7 +5,7 @@
<field id="username" type="string" />
<field id="token" type="string" />
<field id="server" type="string" />
<field id="json" type="associativearray" onChange="setDataFromJSON" />
<field id="json" type="assocarray" onChange="setDataFromJSON" />
<function name="setServer" />
<function name="getPreference" />
<function name="setPreference" />

View File

@ -4,7 +4,7 @@
<interface>
<field id="itemsToLoad" type="string" value="libraries" />
<field id="itemId" type="string" />
<field id="metadata" type="associativearray" />
<field id="metadata" type="assocarray" />
<field id="content" type="array" />
</interface>
<script type="text/brightscript" uri="LoadItemsTask.brs" />

View File

@ -30,7 +30,7 @@
</children>
<interface>
<field id="buttons" type="nodearray" />
<field id="options" type="associativearray" onChange="optionsSet" />
<field id="options" type="assocarray" onChange="optionsSet" />
<field id="audioSteamIndex" type="integer" />
</interface>
<script type="text/brightscript" uri="MovieOptions.brs" />

View File

@ -2,7 +2,7 @@
<component name="SearchRow" extends="RowList">
<interface>
<field id="rowSize" type="int" />
<field id="itemData" type="associativeArray" onChange="getData" />
<field id="itemData" type="assocarray" onChange="getData" />
<field id="query" type="string" />
<field id="itemSelected" type="int" />
</interface>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<component name="TVEpisodeRow" extends="RowList">
<interface>
<field id="objects" type="associativearray" onChange="setupRows" />
<field id="objects" type="assocarray" onChange="setupRows" />
<field id="escapeButton" type="string" alwaysNotify="true" />
</interface>
<script type="text/brightscript" uri="TVEpisodeRow.brs" />

View File

@ -6,7 +6,7 @@
<interface>
<field id="episodeSelected" alias="picker.itemSelected" />
<field id="quickPlayNode" type="node" alwaysNotify="true" />
<field id="seasonData" type="associativearray" onChange="setSeason" />
<field id="seasonData" type="assocarray" onChange="setSeason" />
<field id="objects" alias="picker.objects" />
</interface>
<script type="text/brightscript" uri="TVEpisodes.brs" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<component name="TVSeasonRow" extends="RowList">
<interface>
<field id="TVSeasonData" type="associativearray" onChange="getData" />
<field id="TVSeasonData" type="assocarray" onChange="getData" />
</interface>
<script type="text/brightscript" uri="TVSeasonRow.brs" />
</component>

View File

@ -24,7 +24,7 @@
</children>
<interface>
<field id="itemContent" type="node" onChange="itemContentChanged" />
<field id="seasonData" type="associativearray" alias="seasons.TVSeasonData" />
<field id="seasonData" type="assocarray" alias="seasons.TVSeasonData" />
<field id="seasonSelected" alias="seasons.rowItemSelected" />
</interface>
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />

View File

@ -47,6 +47,11 @@ function CreateServerGroup()
end if
'Append http:// to server
if left(server_hostname.value,4) <> "http" then server_hostname.value = "http://" + server_hostname.value
'If this is a different server from what we know, reset username/password setting
if get_setting("server") <> server_hostname.value then
set_setting("username", "")
set_setting("password", "")
endif
set_setting("server", server_hostname.value)
if ServerInfo() = invalid then
' Maybe don't unset setting, but offer as a prompt
@ -111,11 +116,18 @@ function CreateSigninGroup(user = "")
username_field.label = tr("Username")
username_field.field = "username"
username_field.type = "string"
username_field.value = user
if user = "" and get_setting("username") <> invalid
username_field.value = get_setting("username")
else
username_field.value = user
end if
password_field = CreateObject("roSGNode", "ConfigData")
password_field.label = tr("Password")
password_field.field = "password"
password_field.type = "password"
if get_setting("password") <> invalid
password_field.value = get_setting("password")
end if
items = [ username_field, password_field ]
config.configItems = items
@ -143,7 +155,11 @@ function CreateSigninGroup(user = "")
if node = "submit"
' Validate credentials
get_token(username.value, password.value)
if get_setting("active_user") <> invalid then return "true"
if get_setting("active_user") <> invalid
set_setting("username", username.value)
set_setting("password", password.value)
return "true"
end if
print "Login attempt failed..."
group.findNode("alert").text = tr("Login attempt failed.")
end if