Enable brighterscript, create NPM build scripts, install and use roku-log, and use bsc import statements (#1173)

This commit is contained in:
Charles Ewert 2023-05-03 17:21:04 -04:00 committed by GitHub
parent 92e1535f88
commit 2389af0868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
215 changed files with 1543 additions and 1720 deletions

View File

@ -1,4 +1,4 @@
name: build
name: build-dev
on:
pull_request:
@ -17,11 +17,14 @@ jobs:
with:
node-version: "lts/*"
cache: "npm"
- run: npm ci
- run: npx ropm install
- run: make dev
- name: NPM install
run: npm ci
- name: Install roku module dependencies
run: npx ropm install
- name: Build app
run: npm run build
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: Jellyfin-Roku-dev-${{ github.sha }}
path: ${{ github.workspace }}/out/staging
path: ${{ github.workspace }}/build/staging
if-no-files-found: error

View File

@ -1,4 +1,4 @@
name: build
name: build-prod
on:
pull_request:
@ -66,11 +66,14 @@ jobs:
with:
node-version: "lts/*"
cache: "npm"
- run: npm ci
- run: npx ropm install
- run: make release
- name: NPM install
run: npm ci
- name: Install roku module dependencies
run: npx ropm install
- name: Build app for production
run: npm run build-prod
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: Jellyfin-Roku-release-${{ github.sha }}
path: ${{ github.workspace }}/out/staging
name: Jellyfin-Roku-v${{ env.newManVersion }}-${{ github.sha }}
path: ${{ github.workspace }}/build/staging
if-no-files-found: error

10
.vscode/launch.json vendored
View File

@ -5,6 +5,8 @@
"type": "brightscript",
"request": "launch",
"name": "Jellyfin Debug",
"rootDir": "${workspaceFolder}/build/staging",
"preLaunchTask": "build-dev",
"stopOnEntry": false,
// To enable RALE:
// set "brightscript.debug.raleTrackerTaskFileLocation": "/absolute/path/to/rale/TrackerTask.xml" in your vscode user settings
@ -14,14 +16,6 @@
//"host": "${promptForHost}",
//WARNING: don't edit this value. Instead, set "brightscript.debug.password": "YOUR_PASSWORD_HERE" in your vscode user settings
//"password": "${promptForPassword}",
"files": [
"components/**/*",
"images/**/*",
"locale/**/*",
"settings/**/*",
"source/**/*",
"manifest"
]
},
{
"name": "Run tests",

View File

@ -10,5 +10,6 @@
},
"xml.format.maxLineWidth": 0,
"editor.formatOnSave": true,
"brightscript.output.hyperlinkFormat": "FilenameAndFunction",
"brightscript.bsdk": "node_modules/brighterscript"
}

40
.vscode/tasks.json vendored
View File

@ -1,6 +1,42 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build-dev",
"type": "shell",
"command": "npm run build",
"problemMatcher": [],
"presentation": {
"echo": true,
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "build-prod",
"type": "shell",
"command": "npm run build-prod",
"problemMatcher": [],
"presentation": {
"echo": true,
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "build-tests",
"type": "shell",
@ -8,7 +44,7 @@
"problemMatcher": [],
"presentation": {
"echo": true,
"reveal": "silent",
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
@ -26,7 +62,7 @@
"problemMatcher": [],
"presentation": {
"echo": true,
"reveal": "silent",
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,

37
bsconfig-prod.json Normal file
View File

@ -0,0 +1,37 @@
{
"files": [
"manifest",
"source/**/*.*",
"components/**/*.*",
"images/**/*.*",
"locale/en_US/translations.ts",
"locale/en_GB/translations.ts",
"locale/fr_CA/translations.ts",
"locale/es_ES/translations.ts",
"locale/de_DE/translations.ts",
"locale/it_IT/translations.ts",
"locale/pt_BR/translations.ts",
"settings/**/*.*",
{
"src": "resources/branding/release/*.*",
"dest": "images"
}
],
"plugins": [
"@rokucommunity/bslint",
"roku-log-bsc-plugin"
],
"rokuLog": {
"strip": true,
"insertPkgPath": false,
"removeComments": true
},
"diagnosticFilters": [
"node_modules/**/*",
"**/roku_modules/**/*"
],
"allowBrighterScriptInBrightScript": true,
"autoImportComponentScript": true,
"stagingDir": "build/staging",
"retainStagingDir": true
}

View File

@ -20,7 +20,12 @@
"dest": "settings"
}
],
"diagnosticFilters": [
"node_modules/**/*",
"**/roku_modules/**/*"
],
"autoImportComponentScript": true,
"allowBrighterScriptInBrightScript": true,
"createPackage": false,
"stagingFolderPath": "build",
"plugins": [

View File

@ -10,10 +10,18 @@
],
"plugins": [
"@rokucommunity/bslint",
"rooibos-roku"
"roku-log-bsc-plugin"
],
"rokuLog": {
"insertPkgPath": true
},
"diagnosticFilters": [
"node_modules/**",
"**/roku_modules/**"
]
"node_modules/**/*",
"**/roku_modules/**/*"
],
"sourceMap": true,
"autoImportComponentScript": true,
"allowBrighterScriptInBrightScript": true,
"stagingDir": "build/staging",
"retainStagingDir": true
}

View File

@ -1,9 +1,10 @@
{
"files": [
"source/**/*.brs",
"source/**/*.bs",
"components/**/*.brs",
"components/**/*.bs",
"test-app/**/*.bs"
]
"files": [
"source/**/*.brs",
"source/**/*.bs",
"components/**/*.brs",
"components/**/*.bs",
"test-app/**/*.bs",
"!**/roku_modules/**/*.*"
]
}

View File

@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="ButtonGroupHoriz" extends="ButtonGroup">
<interface>
<field id="escape" type="string" alwaysNotify="true" />
</interface>
<script type="text/brightscript" uri="ButtonGroupHoriz.brs" />
</component>
</component>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="JFButtons" extends="Group">
<children>
<Group>
@ -8,13 +8,13 @@
<rectangle id="focus" />
<LayoutGroup id="buttonGroup" layoutDirection="horiz" itemSpacings = "[75]" translation="[50,20]">
<LayoutGroup id="buttonGroup" layoutDirection="horiz" itemSpacings="[75]" translation="[50,20]">
</LayoutGroup>
<Animation id="moveFocusAnimation" duration="0.25" repeat="false" easeFunction="outQuad">
<FloatFieldInterpolator id = "focusWidth" key="[0.0, 1.0]" keyValue="[ 0.00, 0.25 ]" fieldToInterp="focus.width" />
<FloatFieldInterpolator id = "focusHeight" key="[0.0, 1.0]" keyValue="[ 0.25, 0.00 ]" fieldToInterp="focus.height" />
<Vector2DFieldInterpolator id = "focusLocation" key="[0.0, 1.0]" keyValue="[]" fieldToInterp="focus.translation" />
<FloatFieldInterpolator id="focusWidth" key="[0.0, 1.0]" keyValue="[ 0.00, 0.25 ]" fieldToInterp="focus.width" />
<FloatFieldInterpolator id="focusHeight" key="[0.0, 1.0]" keyValue="[ 0.25, 0.00 ]" fieldToInterp="focus.height" />
<Vector2DFieldInterpolator id="focusLocation" key="[0.0, 1.0]" keyValue="[]" fieldToInterp="focus.translation" />
</Animation>
</Group>
@ -25,5 +25,4 @@
<field id="focusedIndex" type="integer" alwaysNotify="true" />
<field id="selectedIndex" type="integer" onChange="selectedIndexChanged" />
</interface>
<script type="text/brightscript" uri="JFButtons.brs" />
</component>
</component>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="TextSizeTask" extends="Task">
<interface>
<field id="fontName" type="string" />
<field id="fontSize" type="int" />
<field id="text" type="array" />
<field id="text" type="array" />
<field id="maxWidth" type="int" value="1920" />
<field id="name" type="string" />
@ -12,5 +12,4 @@
<field id="width" type="array" />
<field id="height" type="int" />
</interface>
<script type="text/brightscript" uri="TextSizeTask.brs" />
</component>

View File

@ -1,3 +1,6 @@
import "pkg:/source/utils/config.brs"
import "pkg:/source/roku_modules/api/api.brs"
sub init()
m.top.functionName = "getNextEpisodeTask"
end sub

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="GetNextEpisodeTask" extends="Task">
<interface>
@ -6,7 +6,4 @@
<field id="showID" type="string" />
<field id="nextEpisodeData" type="assocarray" />
</interface>
<script type="text/brightscript" uri="GetNextEpisodeTask.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/roku_modules/api/api.brs" />
</component>

View File

@ -1,3 +1,9 @@
import "pkg:/source/utils/config.brs"
import "pkg:/source/utils/misc.brs"
import "pkg:/source/utils/deviceCapabilities.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/roku_modules/api/api.brs"
sub init()
m.top.functionName = "getPlaybackInfoTask"
end sub

View File

@ -1,14 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="GetPlaybackInfoTask" extends="Task">
<interface>
<field id="videoID" type="string" />
<field id="data" type="assocarray" />
</interface>
<script type="text/brightscript" uri="GetPlaybackInfoTask.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/deviceCapabilities.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/roku_modules/api/api.brs" />
</component>

View File

@ -1,3 +1,6 @@
import "pkg:/source/utils/config.brs"
import "pkg:/source/roku_modules/api/api.brs"
sub init()
m.top.functionName = "getShuffleEpisodesTask"
end sub

View File

@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="GetShuffleEpisodesTask" extends="Task">
<interface>
<field id="showID" type="string" />
<field id="data" type="assocarray" />
</interface>
<script type="text/brightscript" uri="GetShuffleEpisodesTask.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/roku_modules/api/api.brs" />
</component>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="IconButton" extends="Group">
<children>
<Poster id="buttonBackground" uri="pkg:/images/white.9.png" />
@ -17,5 +17,4 @@
<field id="focus" type="boolean" />
<field id="escape" type="string" value="" />
</interface>
<script type="text/brightscript" uri="IconButton.brs" />
</component>
</component>

View File

@ -1,55 +1,54 @@
<?xml version="1.0" encoding="utf-8" ?>
<component name="Alpha" extends = "Group">
<?xml version="1.0" encoding="utf-8"?>
<component name="Alpha" extends="Group">
<children>
<LabelList
translation="[50, 185]"
vertFocusAnimationStyle="floatingFocus"
drawFocusFeedback="true"
id = "Alphamenu"
font="font:SmallestSystemFont"
itemSpacing="[0,2]"
itemSize="[28,28]"
numRows="27"
textHorizAlign="center"
focusBitmapUri = "pkg:/images/white.png"
focusBitmapBlendColor = "#FFFFFF"
focusFootprintBlendColor = "#666666"
<LabelList
translation="[50, 185]"
vertFocusAnimationStyle="floatingFocus"
drawFocusFeedback="true"
id="Alphamenu"
font="font:SmallestSystemFont"
itemSpacing="[0,2]"
itemSize="[28,28]"
numRows="27"
textHorizAlign="center"
focusBitmapUri="pkg:/images/white.png"
focusBitmapBlendColor="#FFFFFF"
focusFootprintBlendColor="#666666"
>
<ContentNode id="alphatext" role = "content" >
<ContentNode title = "#" />
<ContentNode title = "A" />
<ContentNode title = "B" />
<ContentNode title = "C" />
<ContentNode title = "D" />
<ContentNode title = "E" />
<ContentNode title = "F" />
<ContentNode title = "G" />
<ContentNode title = "H" />
<ContentNode title = "I" />
<ContentNode title = "J" />
<ContentNode title = "K" />
<ContentNode title = "L" />
<ContentNode title = "M" />
<ContentNode title = "N" />
<ContentNode title = "O" />
<ContentNode title = "P" />
<ContentNode title = "Q" />
<ContentNode title = "R" />
<ContentNode title = "S" />
<ContentNode title = "T" />
<ContentNode title = "U" />
<ContentNode title = "V" />
<ContentNode title = "W" />
<ContentNode title = "X" />
<ContentNode title = "Y" />
<ContentNode title = "Z" />
</ContentNode>
</LabelList>
<ContentNode id="alphatext" role="content">
<ContentNode title="#" />
<ContentNode title="A" />
<ContentNode title="B" />
<ContentNode title="C" />
<ContentNode title="D" />
<ContentNode title="E" />
<ContentNode title="F" />
<ContentNode title="G" />
<ContentNode title="H" />
<ContentNode title="I" />
<ContentNode title="J" />
<ContentNode title="K" />
<ContentNode title="L" />
<ContentNode title="M" />
<ContentNode title="N" />
<ContentNode title="O" />
<ContentNode title="P" />
<ContentNode title="Q" />
<ContentNode title="R" />
<ContentNode title="S" />
<ContentNode title="T" />
<ContentNode title="U" />
<ContentNode title="V" />
<ContentNode title="W" />
<ContentNode title="X" />
<ContentNode title="Y" />
<ContentNode title="Z" />
</ContentNode>
</LabelList>
</children>
<interface>
<field id="selectedItem" type="node" alwaysNotify="true" />
<field id="focusedChild" type="node" onChange="focusChanged" />
<field id="itemAlphaSelected" type="string" />
</interface>
<script type="text/brightscript" uri="Alpha.brs" />
</component>

View File

@ -1,3 +1,7 @@
import "pkg:/source/api/UserLibrary.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
sub init()
m.top.functionName = "setFavoriteStatus"
end sub

View File

@ -1,12 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="FavoriteItemsTask" extends="Task">
<interface>
<field id="itemId" type="string" />
<field id="favTask" type="string" value="" />
</interface>
<script type="text/brightscript" uri="FavoriteItemsTask.brs" />
<script type="text/brightscript" uri="pkg:/source/api/UserLibrary.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>

View File

@ -1,4 +1,9 @@
import "pkg:/source/utils/config.brs"
import "pkg:/source/utils/misc.brs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
sub init()
m.log = log.Logger("GridItem")
m.posterMask = m.top.findNode("posterMask")
m.itemPoster = m.top.findNode("itemPoster")
m.itemIcon = m.top.findNode("itemIcon")
@ -117,7 +122,7 @@ sub itemContentChanged()
m.posterText.height = 200
m.posterText.width = 280
else
print "Unhandled Grid Item Type: " + itemData.type
m.log.warn("Unhandled Grid Item Type", itemData.type)
end if
'If Poster not loaded, ensure "blue box" is shown until loaded

View File

@ -18,7 +18,4 @@
<field id="itemHasFocus" type="boolean" onChange="focusChanged" />
<field id="focusPercent" type="float" onChange="focusChanging" />
</interface>
<script type="text/brightscript" uri="GridItem.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
</component>

View File

@ -1,3 +1,6 @@
import "pkg:/source/utils/misc.brs"
import "pkg:/source/utils/config.brs"
sub init()
m.itemPoster = m.top.findNode("itemPoster")
m.posterText = m.top.findNode("posterText")

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="GridItemSmall" extends="Group">
<children>
<Poster id="backdrop" translation="[0,15]" width="230" height="320" loadDisplayMode="scaleToZoom" uri="pkg:/images/white.9.png" />
@ -11,7 +11,4 @@
<field id="itemContent" type="node" onChange="itemContentChanged" />
<field id="itemHasFocus" type="boolean" onChange="focusChanged" alwaysNotify="true" />
</interface>
<script type="text/brightscript" uri="GridItemSmall.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>
</component>

View File

@ -1,5 +1,11 @@
sub init()
import "pkg:/source/utils/misc.brs"
import "pkg:/source/utils/config.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/deviceCapabilities.brs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
sub init()
m.log = log.Logger("ItemGrid")
m.options = m.top.findNode("options")
m.showItemCount = get_user_setting("itemgrid.showItemCount") = "true"
@ -206,7 +212,7 @@ sub loadInitialItems()
m.loadItemsTask.itemType = "Series,Movie"
m.loadItemsTask.itemId = m.top.parentItem.parentFolder
else
print "[ItemGrid] Unknown Type: " m.top.parentItem
m.log.warn("Unknown Item Type", m.top.parentItem)
end if
if m.top.parentItem.type <> "Folder" and (m.options.view = "Networks" or m.view = "Networks" or m.options.view = "Studios" or m.view = "Studios")

View File

@ -1,36 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="ItemGrid" extends="JFGroup">
<children>
<VoiceTextEditBox id="VoiceBox" visible="true" width = "40" translation = "[52, 120]" />
<Rectangle id="VoiceBoxCover" height="240" width="100" color="0x262626ff" translation = "[25, 75]" />
<VoiceTextEditBox id="VoiceBox" visible="true" width="40" translation="[52, 120]" />
<Rectangle id="VoiceBoxCover" height="240" width="100" color="0x262626ff" translation="[25, 75]" />
<poster id="backdrop" loadDisplayMode="scaleToFill" width="1920" height="1080" opacity="0.25" />
<poster id="backdropTransition" loadDisplayMode="scaleToFill" width="1920" height="1080" opacity="0.25" />
<MarkupGrid
id = "itemGrid"
translation = "[ 96, 160 ]"
itemComponentName = "GridItem"
numColumns = "6"
numRows = "5"
vertFocusAnimationStyle = "fixed"
itemSize = "[ 290, 425 ]"
itemSpacing = "[ 0, 45 ]"
drawFocusFeedback = "false" />
<MarkupGrid
id="itemGrid"
translation="[ 96, 160 ]"
itemComponentName="GridItem"
numColumns="6"
numRows="5"
vertFocusAnimationStyle="fixed"
itemSize="[ 290, 425 ]"
itemSpacing="[ 0, 45 ]"
drawFocusFeedback="false" />
<RowList opacity="0" id="genrelist" translation="[120, 160]" showRowLabel="true" itemComponentName="GridItemSmall" numColumns="1" numRows="3" vertFocusAnimationStyle="fixed" itemSize = "[1900, 360]" rowItemSize="[ [230, 320] ]" rowItemSpacing="[ [20, 0] ]" itemSpacing="[0, 60]" />
<RowList opacity="0" id="genrelist" translation="[120, 160]" showRowLabel="true" itemComponentName="GridItemSmall" numColumns="1" numRows="3" vertFocusAnimationStyle="fixed" itemSize="[1900, 360]" rowItemSize="[ [230, 320] ]" rowItemSpacing="[ [20, 0] ]" itemSpacing="[0, 60]" />
<Label id="micButtonText" font="font:SmallSystemFont" visible="false" />
<Button id = "micButton" maxWidth = "20" translation = "[20, 120]" iconUri = "pkg:/images/icons/mic_icon.png"/>
<Button id="micButton" maxWidth="20" translation="[20, 120]" iconUri="pkg:/images/icons/mic_icon.png" />
<Label translation="[0,540]" id="emptyText" font="font:LargeSystemFont" width="1910" horizAlign="center" vertAlign="center" height="64" visible="false" />
<ItemGridOptions id="options" visible="false" />
<Spinner id="spinner" translation="[900, 450]" />
<Animation id="backroundSwapAnimation" duration="1" repeat="false" easeFunction="linear">
<FloatFieldInterpolator id = "fadeinLoading" key="[0.0, 1.0]" keyValue="[ 0.00, 0.25 ]" fieldToInterp="backdropTransition.opacity" />
<FloatFieldInterpolator id = "fadeoutLoaded" key="[0.0, 1.0]" keyValue="[ 0.25, 0.00 ]" fieldToInterp="backdrop.opacity" />
<FloatFieldInterpolator id="fadeinLoading" key="[0.0, 1.0]" keyValue="[ 0.00, 0.25 ]" fieldToInterp="backdropTransition.opacity" />
<FloatFieldInterpolator id="fadeoutLoaded" key="[0.0, 1.0]" keyValue="[ 0.25, 0.00 ]" fieldToInterp="backdrop.opacity" />
</Animation>
<Alpha id="AlphaMenu" />
</children>
<interface>
<field id="HomeLibraryItem" type="string"/>
<field id="HomeLibraryItem" type="string" />
<field id="parentItem" type="node" onChange="loadInitialItems" />
<field id="selectedItem" type="node" alwaysNotify="true" />
<field id="quickPlayNode" type="node" alwaysNotify="true" />
@ -39,9 +39,4 @@
<field id="alphaActive" type="boolean" value="false" />
<field id="jumpToItem" type="integer" value="" />
</interface>
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/deviceCapabilities.brs" />
<script type="text/brightscript" uri="ItemGrid.brs" />
</component>
</component>

View File

@ -1,5 +1,8 @@
sub init()
import "pkg:/source/utils/misc.brs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
sub init()
m.log = log.Logger("ItemGridOptions")
m.buttons = m.top.findNode("buttons")
m.buttons.buttons = [tr("View"), tr("Sort"), tr("Filter")]
m.buttons.selectedIndex = 1
@ -203,7 +206,7 @@ sub setHeartColor(color as string)
end if
end for
catch e
print e.number, e.message
m.log.error("setHeartColor()", e.number, e.message)
end try
end sub

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="ItemGridOptions" extends="Group">
<children>
<Rectangle width="1920" height="1080" color="#000000" opacity="0.75" />
@ -52,6 +52,4 @@
<field id="favorite" type="string" value="Favorite" />
</interface>
<script type="text/brightscript" uri="ItemGridOptions.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
</component>
</component>

View File

@ -1,4 +1,14 @@
import "pkg:/source/api/Items.brs"
import "pkg:/source/roku_modules/api/api.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
import "pkg:/source/utils/misc.brs"
import "pkg:/source/api/Image.brs"
import "pkg:/source/utils/deviceCapabilities.brs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
sub init()
m.log = log.Logger("LoadItemsTask2")
m.top.functionName = "loadItems"
m.top.limit = 60
@ -235,7 +245,7 @@ sub loadItems()
tmp.posterUrl = api_API().items.getimageurl(item.id, "primary", 0, { "maxHeight": 280, "maxWidth": 280, "quality": "90" })
else
print "[LoadItems] Unknown Type: " item.Type
m.log.warn("Unknown Type", item.Type)
end if
if tmp <> invalid

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="LoadItemsTask2" extends="Task">
<interface>
@ -21,12 +21,4 @@
<field id="totalRecordCount" type="int" value="-1" />
<field id="content" type="array" />
</interface>
<script type="text/brightscript" uri="LoadItemsTask2.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Items.brs" />
<script type="text/brightscript" uri="pkg:/source/roku_modules/api/api.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/deviceCapabilities.brs" />
</component>

View File

@ -1,3 +1,13 @@
import "pkg:/source/utils/misc.brs"
import "pkg:/source/api/Items.brs"
import "pkg:/source/api/UserLibrary.brs"
import "pkg:/source/roku_modules/api/api.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
import "pkg:/source/api/Image.brs"
import "pkg:/source/api/userauth.brs"
import "pkg:/source/utils/deviceCapabilities.brs"
sub init()
m.top.functionName = "loadItems"

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="LoadVideoContentTask" extends="Task">
<interface>
@ -20,14 +20,4 @@
<field id="totalRecordCount" type="int" value="-1" />
<field id="content" type="array" />
</interface>
<script type="text/brightscript" uri="LoadVideoContentTask.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Items.brs" />
<script type="text/brightscript" uri="pkg:/source/api/UserLibrary.brs" />
<script type="text/brightscript" uri="pkg:/source/roku_modules/api/api.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="pkg:/source/api/userauth.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/deviceCapabilities.brs" />
</component>

View File

@ -1,3 +1,10 @@
import "pkg:/source/utils/misc.brs"
import "pkg:/source/utils/config.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/api/Image.brs"
import "pkg:/source/utils/deviceCapabilities.brs"
import "pkg:/source/roku_modules/api/api.brs"
sub setupNodes()
m.options = m.top.findNode("options")
m.itemGrid = m.top.findNode("itemGrid")

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="MovieLibraryView" extends="JFScreen">
<children>
<Rectangle id="screenSaverBackground" width="1920" height="1080" color="#000000" />
<VoiceTextEditBox id="VoiceBox" visible="true" width = "40" translation = "[52, 120]" />
<Rectangle id="VoiceBoxCover" height="240" width="100" color="0x000000ff" translation = "[25, 75]" />
<VoiceTextEditBox id="VoiceBox" visible="true" width="40" translation="[52, 120]" />
<Rectangle id="VoiceBoxCover" height="240" width="100" color="0x000000ff" translation="[25, 75]" />
<maskGroup translation="[820, 0]" id="backgroundMask" maskUri="pkg:/images/backgroundmask.png" maskSize="[1220,700]">
<poster id="backdrop" loadDisplayMode="scaleToFill" width="1100" height="700" opacity="1" />
@ -33,21 +33,21 @@
<Label id="selectedMovieOverview" font="font:SmallestSystemFont" translation="[120, 360]" wrap="true" lineSpacing="20" maxLines="5" width="850" ellipsisText="..." />
<MarkupGrid id="itemGrid" itemComponentName="GridItemSmall" numColumns="7" numRows="2" vertFocusAnimationStyle="fixed" itemSize="[230, 310]" itemSpacing="[20, 20]" />
<RowList opacity="0" id="genrelist" translation="[120, 60]" showRowLabel="true" itemComponentName="GridItemSmall" numColumns="1" numRows="3" vertFocusAnimationStyle="fixed" itemSize = "[1900, 360]" rowItemSize="[ [230, 320] ]" rowItemSpacing="[ [20, 0] ]" itemSpacing="[0, 60]" />
<RowList opacity="0" id="genrelist" translation="[120, 60]" showRowLabel="true" itemComponentName="GridItemSmall" numColumns="1" numRows="3" vertFocusAnimationStyle="fixed" itemSize="[1900, 360]" rowItemSize="[ [230, 320] ]" rowItemSpacing="[ [20, 0] ]" itemSpacing="[0, 60]" />
<Label id="micButtonText" font="font:SmallSystemFont" visible="false" />
<Button id = "micButton" maxWidth = "20" translation = "[20, 120]" iconUri = "pkg:/images/icons/mic_icon.png"/>
<Button id="micButton" maxWidth="20" translation="[20, 120]" iconUri="pkg:/images/icons/mic_icon.png" />
<Label translation="[0,540]" id="emptyText" font="font:LargeSystemFont" width="1910" horizAlign="center" vertAlign="center" height="64" visible="false" />
<ItemGridOptions id="options" visible="false" />
<Spinner id="spinner" translation="[900, 450]" />
<Animation id="backroundSwapAnimation" duration="1" repeat="false" easeFunction="linear">
<FloatFieldInterpolator id = "fadeinLoading" key="[0.0, 1.0]" keyValue="[ 0.00, 1.00 ]" fieldToInterp="backdropTransition.opacity" />
<FloatFieldInterpolator id = "fadeoutLoaded" key="[0.0, 1.0]" keyValue="[ 1.00, 0.00 ]" fieldToInterp="backdrop.opacity" />
<FloatFieldInterpolator id="fadeinLoading" key="[0.0, 1.0]" keyValue="[ 0.00, 1.00 ]" fieldToInterp="backdropTransition.opacity" />
<FloatFieldInterpolator id="fadeoutLoaded" key="[0.0, 1.0]" keyValue="[ 1.00, 0.00 ]" fieldToInterp="backdrop.opacity" />
</Animation>
<Alpha id="AlphaMenu" />
</children>
<interface>
<field id="HomeLibraryItem" type="string"/>
<field id="HomeLibraryItem" type="string" />
<field id="parentItem" type="node" onChange="loadInitialItems" />
<field id="selectedItem" type="node" alwaysNotify="true" />
<field id="quickPlayNode" type="node" alwaysNotify="true" />
@ -57,11 +57,4 @@
<field id="showItemTitles" type="string" value="showonhover" />
<field id="jumpToItem" type="integer" value="" />
</interface>
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/deviceCapabilities.brs" />
<script type="text/brightscript" uri="MovieLibraryView.brs" />
<script type="text/brightscript" uri="pkg:/source/roku_modules/api/api.brs" />
</component>
</component>

View File

@ -1,3 +1,6 @@
import "pkg:/source/utils/misc.brs"
import "pkg:/source/utils/config.brs"
sub init()
m.itemPoster = m.top.findNode("itemPoster")
m.postTextBackground = m.top.findNode("postTextBackground")

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="MusicArtistGridItem" extends="Group">
<children>
<Poster id="backdrop" translation="[0,15]" width="280" height="280" loadDisplayMode="scaleToZoom" uri="pkg:/images/white.9.png" />
<Poster id="itemPoster" translation="[0,15]" width="280" height="280" loadDisplayMode="scaleToZoom" />
<Rectangle id="postTextBackground" height="50" width="270" color="0x000000DD" translation = "[5, 240]">
<Rectangle id="postTextBackground" height="50" width="270" color="0x000000DD" translation="[5, 240]">
<ScrollingLabel id="posterText" color="#FFFFFF" maxWidth="270" height="50" horizAlign="center" vertAlign="center" />
</Rectangle>
</children>
@ -11,7 +11,4 @@
<field id="itemContent" type="node" onChange="itemContentChanged" />
<field id="itemHasFocus" type="boolean" onChange="focusChanged" />
</interface>
<script type="text/brightscript" uri="MusicArtistGridItem.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>
</component>

View File

@ -1,3 +1,9 @@
import "pkg:/source/utils/misc.brs"
import "pkg:/source/utils/config.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/api/Image.brs"
import "pkg:/source/utils/deviceCapabilities.brs"
sub setupNodes()
m.options = m.top.findNode("options")
m.itemGrid = m.top.findNode("itemGrid")

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="MusicLibraryView" extends="JFScreen">
<children>
<Rectangle id="screenSaverBackground" width="1920" height="1080" color="#000000" />
<VoiceTextEditBox id="VoiceBox" visible="true" width = "40" translation = "[52, 120]" />
<Rectangle id="VoiceBoxCover" height="240" width="100" color="0x000000ff" translation = "[25, 75]" />
<VoiceTextEditBox id="VoiceBox" visible="true" width="40" translation="[52, 120]" />
<Rectangle id="VoiceBoxCover" height="240" width="100" color="0x000000ff" translation="[25, 75]" />
<maskGroup translation="[820, 0]" id="backgroundMask" maskUri="pkg:/images/backgroundmask.png" maskSize="[1220,445]">
<poster id="backdrop" loadDisplayMode="scaleToFill" width="1100" height="450" opacity="1" />
@ -21,18 +21,18 @@
<MarkupGrid id="genrelist" itemComponentName="MusicArtistGridItem" numColumns="6" numRows="4" vertFocusAnimationStyle="fixed" translation="[96, 60]" itemSize="[280, 280]" itemSpacing="[20, 20]" opacity="0" />
<Label id="micButtonText" font="font:SmallSystemFont" visible="false" />
<Button id = "micButton" maxWidth = "20" translation = "[20, 120]" iconUri = "pkg:/images/icons/mic_icon.png"/>
<Button id="micButton" maxWidth="20" translation="[20, 120]" iconUri="pkg:/images/icons/mic_icon.png" />
<Label translation="[0,540]" id="emptyText" font="font:LargeSystemFont" width="1910" horizAlign="center" vertAlign="center" height="64" visible="false" />
<ItemGridOptions id="options" visible="false" />
<Spinner id="spinner" translation="[900, 450]" />
<Animation id="backroundSwapAnimation" duration="1" repeat="false" easeFunction="linear">
<FloatFieldInterpolator id = "fadeinLoading" key="[0.0, 1.0]" keyValue="[ 0.00, 1.00 ]" fieldToInterp="backdropTransition.opacity" />
<FloatFieldInterpolator id = "fadeoutLoaded" key="[0.0, 1.0]" keyValue="[ 1.00, 0.00 ]" fieldToInterp="backdrop.opacity" />
<FloatFieldInterpolator id="fadeinLoading" key="[0.0, 1.0]" keyValue="[ 0.00, 1.00 ]" fieldToInterp="backdropTransition.opacity" />
<FloatFieldInterpolator id="fadeoutLoaded" key="[0.0, 1.0]" keyValue="[ 1.00, 0.00 ]" fieldToInterp="backdrop.opacity" />
</Animation>
<Alpha id="AlphaMenu" />
</children>
<interface>
<field id="HomeLibraryItem" type="string"/>
<field id="HomeLibraryItem" type="string" />
<field id="parentItem" type="node" onChange="loadInitialItems" />
<field id="selectedItem" type="node" alwaysNotify="true" />
<field id="quickPlayNode" type="node" alwaysNotify="true" />
@ -42,10 +42,4 @@
<field id="showItemTitles" type="string" value="showonhover" />
<field id="jumpToItem" type="integer" value="" />
</interface>
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/deviceCapabilities.brs" />
<script type="text/brightscript" uri="MusicLibraryView.brs" />
</component>
</component>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="JFButton" extends="Button">
<interface>
<field id="minChars" type="int" />
</interface>
<script type="text/brightscript" uri="JFButton.brs" />
</component>
</component>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="JFGroup" extends="Group">
<interface>
<field id="backPressed" type="boolean" alwaysNotify="true" />
@ -7,5 +7,4 @@
<field id="optionsAvailable" value="true" type="boolean" />
<field id="overhangVisible" value="true" type="boolean" />
</interface>
<script type="text/brightscript" uri="JFGroup.brs" />
</component>
</component>

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="JFMessageDialog" extends="JFGroup">
<children>
<Poster
id="dialogBackground"
uri="pkg:/images/dialog.9.png"
blendColor="#000000"
translation="[0, 0]"
/>
id="dialogBackground"
uri="pkg:/images/dialog.9.png"
blendColor="#000000"
translation="[0, 0]"
/>
<Label id="messageText" horizAlign="center" wrap="true" />
<LabelList id="optionList" vertFocusAnimationStyle="floatingFocus" textHorizAlign="center">
<ContentNode id = "content" role = "content"></ContentNode>
<ContentNode id="content" role="content"></ContentNode>
</LabelList>
</children>
<interface>
<field id="id" type="string" />
@ -20,5 +20,4 @@
<field id="fontHeight" type="integer" />
<field id="fontWidth" type="integer" />
</interface>
<script type="text/brightscript" uri="JFMessageDialog.brs" />
</component>
</component>

View File

@ -1,3 +1,5 @@
import "pkg:/source/utils/config.brs"
sub init()
m.top.id = "overhang"
' hide seperators till they're needed

View File

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="JFOverhang" extends="Group">
<children>
<Poster id="overlayLogo" uri="pkg:/images/logo.png" translation="[70, 53]" width="270" height="72" />
<LayoutGroup id="overlayLeftGroup" layoutDirection="horiz" translation="[375, 53]" itemSpacings="30">
<Rectangle id="overlayLeftSeperator" color="#666666" width="2" height="64"/>
<Rectangle id="overlayLeftSeperator" color="#666666" width="2" height="64" />
<ScrollingLabel id="overlayTitle" font="font:LargeSystemFont" vertAlign="center" height="64" maxWidth="1100" repeatCount="0" />
</LayoutGroup>
<LayoutGroup id="overlayRightGroup" layoutDirection="horiz" itemSpacings="30" translation="[1820, 53]" horizAlignment="right">
<Label id="overlayCurrentUser" font="font:MediumSystemFont" width="300" horizAlign="right" vertAlign="center" height="64" />
<Rectangle id="overlayRightSeperator" color="#666666" width="2" height="64" visible="false"/>
<Rectangle id="overlayRightSeperator" color="#666666" width="2" height="64" visible="false" />
<LayoutGroup id="overlayTimeGroup" layoutDirection="horiz" horizAlignment="right" itemSpacings="0">
<Label id="overlayHours" font="font:MediumSystemFont" vertAlign="center" height="64" />
<Label font="font:MediumSystemFont" text=":" vertAlign="center" height="64" />
@ -40,6 +40,4 @@
<field id="disableMoveAnimation" value="false" type="boolean" />
<function name="resetTime" />
</interface>
<script type="text/brightscript" uri="JFOverhang.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>
</component>

View File

@ -1,3 +1,5 @@
import "pkg:/source/utils/misc.brs"
sub init()
m.top.backgroundColor = "#262626" '"#101010"
m.top.backgroundURI = ""

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="JFScene" extends="Scene">
<children>
<Group id="content" />
@ -7,6 +7,4 @@
<interface>
<field id="exit" type="boolean" alwaysNotify="true" />
</interface>
<script type="text/brightscript" uri="JFScene.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
</component>
</component>

View File

@ -1,3 +1,10 @@
import "pkg:/source/roku_modules/log/LogMixin.brs"
sub init()
' initialize the log manager. second param sets log output:
' 1 error, 2 warn, 3 info, 4 verbose, 5 debug
_rLog = log_initializeLogManager(["log_PrintTransport"], 5) 'bs:disable-line
end sub
' Function called when the screen is displayed by the screen manager
' It is expected that screens override this function to handle focus
' managmenet and any other actions required on screen shown
@ -14,3 +21,4 @@ end sub
' to handle focus any actions required on the screen being hidden
sub OnScreenHidden()
end sub

View File

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="JFScreen" extends="JFGroup">
<interface>
<function name="OnScreenShown" />
<function name="OnScreenHidden" />
</interface>
<script type="text/brightscript" uri="JFScreen.brs" />
</component>
</component>

View File

@ -1,3 +1,7 @@
import "pkg:/source/utils/misc.brs"
import "pkg:/source/utils/config.brs"
import "pkg:/source/roku_modules/api/api.brs"
sub init()
m.playbackTimer = m.top.findNode("playbackTimer")
m.bufferCheckTimer = m.top.findNode("bufferCheckTimer")

View File

@ -23,11 +23,6 @@
<field id="mediaSourceId" type="string" />
<field id="audioIndex" type="integer" />
</interface>
<script type="text/brightscript" uri="JFVideo.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/roku_modules/api/api.brs" />
<children>
<Group id="captionGroup" translation="[960,1020]"></Group>

View File

@ -1,3 +1,6 @@
import "pkg:/source/utils/config.brs"
import "pkg:/source/utils/misc.brs"
sub init()
m.title = m.top.findNode("title")
m.staticTitle = m.top.findNode("staticTitle")

View File

@ -16,7 +16,4 @@
<field id="itemWidth" type="integer" />
<field id="itemHasFocus" type="boolean" onChange="focusChanged" />
</interface>
<script type="text/brightscript" uri="ListPoster.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
</component>

View File

@ -0,0 +1,17 @@
sub setTitle()
m.top.findNode("titleArea").primaryTitle = m.top.title
end sub
sub setOverview()
m.top.findNode("description").text = m.top.overview
end sub
function onKeyEvent(key as string, press as boolean) as boolean
if press = false then return false
if key = "OK" and m.top.findNode("contentArea").isInFocusChain()
m.top.close = true
end if
return false
end function

View File

@ -1,35 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="OverviewDialog" extends="StandardDialog">
<interface>
<field id="Title" type="string" onchange="setTitle" />
<field id="Overview" type="string" onChange="setOverview" />
</interface>
<script type="text/brightscript">
<![CDATA[
sub setTitle()
m.top.findNode("titleArea").primaryTitle = m.top.title
end sub
sub setOverview()
m.top.findNode("description").text = m.top.overview
end sub
function onKeyEvent(key as string, press as boolean) as boolean
if press = false then return false
if key = "OK" and m.top.findNode("contentArea").isInFocusChain()
m.top.close = true
end if
return false
end function
]]>
</script>
<children>
<StdDlgTitleArea id="titleArea" />
<StdDlgContentArea id="contentArea">
<StdDlgTextItem id="description"
namedTextStyle="normal" />
</StdDlgContentArea>
</children>
<interface>
<field id="Title" type="string" onchange="setTitle" />
<field id="Overview" type="string" onChange="setOverview" />
</interface>
<children>
<StdDlgTitleArea id="titleArea" />
<StdDlgContentArea id="contentArea">
<StdDlgTextItem id="description"
namedTextStyle="normal" />
</StdDlgContentArea>
</children>
</component>

View File

@ -1,3 +1,7 @@
import "pkg:/source/api/Image.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
sub init()
m.dscr = m.top.findNode("description")
m.vidsList = m.top.findNode("extrasGrid")

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="PersonDetails" extends="JFGroup">
<interface>
<field id="itemContent" type="node" onChange="loadPerson" />
@ -7,26 +7,26 @@
</interface>
<children>
<LayoutGroup id="main_group"
layoutdirection="vert" translation="[60, 180]" itemSpacings="[36]" >
<LayoutGroup id="header_group" layoutdirection="horiz" >
<LayoutGroup id="title_group" layoutdirection="vert" itemSpacings="[11]" >
<Rectangle id="title_rectangle" height="100" width="1426" color="#262626">
<Label id="name" font="font:LargeBoldSystemFont" height="100" width="1426" vertAlign="bottom" />
</Rectangle>
</LayoutGroup>
<ButtonGroupHoriz id="buttons" >
<Button id="favorite-button" text="Favorite" iconUri="" focusedIconUri="" />
</ButtonGroupHoriz>
layoutdirection="vert" translation="[60, 180]" itemSpacings="[36]">
<LayoutGroup id="header_group" layoutdirection="horiz">
<LayoutGroup id="title_group" layoutdirection="vert" itemSpacings="[11]">
<Rectangle id="title_rectangle" height="100" width="1426" color="#262626">
<Label id="name" font="font:LargeBoldSystemFont" height="100" width="1426" vertAlign="bottom" />
</Rectangle>
</LayoutGroup>
<ButtonGroupHoriz id="buttons">
<Button id="favorite-button" text="Favorite" iconUri="" focusedIconUri="" />
</ButtonGroupHoriz>
</LayoutGroup>
<LayoutGroup id="personInfoGroup"
layoutDirection="horiz" itemSpacings="[46]">
layoutDirection="horiz" itemSpacings="[46]">
<Poster id="personImage"
width="430" height="645" />
width="430" height="645" />
<LayoutGroup id="vertSpacer" layoutDirection="vert" itemSpacings="[24]">
<LayoutGroup id="dataGroup>" layoutDirection="vert" translation="[450,180]">
<Rectangle id="dscrBorder" height="645" width="1322" color="0x202020ff" visible="true">
<Rectangle id='dscrRect' translation="[3, 3]" height="639" width="1316" color="0x202020ff">
<Label id="description"
<Label id="description"
height="627" width="1280" wrap="true" translation="[18, 15]"
font="font:SmallestSystemFont" color="#e4e4e4ff" ellipsisText=" ... (-OK- for More)" />
</Rectangle>
@ -37,8 +37,4 @@
</LayoutGroup>
<extrasSlider id="personVideos" />
</children>
<script type="text/brightscript" uri="PersonDetails.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>
</component>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<!-- A PlaybackDialog is a regular dialog, except it takes key releases -->
<!-- instead of presses so that key releases don't fall into other listeners -->
<component name="PlaybackDialog" extends="Dialog">
<script type="text/brightscript" uri="PlaybackDialog.brs" />
</component>

View File

@ -3,5 +3,4 @@
<children>
<Label id="checkmark" width="60" height="50" font="font:MediumBoldSystemFont" horizAlign="center" vertAlign="bottom" text="✓" />
</children>
<script type="text/brightscript" uri="PlayedCheckmark.brs" />
</component>

View File

@ -1,3 +1,6 @@
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
sub init()
m.top.functionName = "PlaystateUpdate"
end sub

View File

@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="PlaystateTask" extends="Task">
<interface>
<field id="status" type="string" />
<field id="params" type="assocarray" />
</interface>
<script type="text/brightscript" uri="PlaystateTask.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>

View File

@ -1,3 +1,5 @@
import "pkg:/source/utils/misc.brs"
sub init()
m.content = m.top.findNode("content")
m.top.observeField("contentData", "onContentDataChanged")

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="RadioDialog" extends="StandardMessageDialog">
<children>
<StdDlgContentArea>
@ -8,6 +8,4 @@
<interface>
<field id="contentData" type="assocarray" />
</interface>
<script type="text/brightscript" uri="RadioDialog.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
</component>

View File

@ -1,3 +1,9 @@
import "pkg:/source/api/Items.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
import "pkg:/source/api/Image.brs"
import "pkg:/source/utils/deviceCapabilities.brs"
sub init()
m.top.layoutDirection = "vert"
m.top.horizAlignment = "center"

View File

@ -1,16 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="SearchBox" extends="LayoutGroup">
<children>
<Label id = "text" text="" visible="false" />
<DynamicMiniKeyboard id="search_Key" />
<Label id="text" text="" visible="false" />
<DynamicMiniKeyboard id="search_Key" />
</children>
<interface>
<field id="search_values" type="string" alwaysNotify="true" />
</interface>
<script type="text/brightscript" uri="SearchBox.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Items.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/deviceCapabilities.brs" />
</component>
</component>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="Spinner" extends="BusySpinner">
<script type="text/brightscript" uri="Spinner.brs" />
</component>
</component>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="StandardDialog" extends="StandardMessageDialog">
<children>
<StdDlgContentArea id="content" />
@ -6,5 +6,4 @@
<interface>
<field id="contentData" type="assocarray" />
</interface>
<script type="text/brightscript" uri="StandardDialog.brs" />
</component>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="WhatsNewDialog" extends="StandardMessageDialog">
<children>
<StdDlgContentArea id="content" />
</children>
<script type="text/brightscript" uri="WhatsNewDialog.brs" />
</component>

View File

@ -1,3 +1,6 @@
import "pkg:/source/utils/config.brs"
import "pkg:/source/api/baserequest.brs"
sub init()
m.top.observeField("url", "fetchCaption")
m.top.currentCaption = []

View File

@ -6,9 +6,6 @@
<field id="playerState" type="string" value="stopped" />
<field id="currentPos" type="int" />
</interface>
<script type="text/brightscript" uri="captionTask.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<children>
<timer id="captionTimer" repeat="true" duration="0.1" />
</children>

View File

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="ConfigData" extends="ContentNode">
<interface>
<field id="label" type="string" />
<field id="value" type="string" />
<field id="type" type="string" />
</interface>
<script type="text/brightscript" uri="ConfigData.brs" />
</component>
</component>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="ConfigItem" extends="Group">
<children>
<LayoutGroup layoutDirection="horiz" >
<LayoutGroup layoutDirection="horiz">
<Label id="label" />
<TextEditBox id="value" />
</LayoutGroup>
@ -11,6 +11,4 @@
<field id="itemContent" type="node" onChange="itemContentChanged" />
<field id="itemHasFocus" type="boolean" onChange="setColors" />
</interface>
<script type="text/brightscript" uri="ConfigItem.brs" />
</component>
</component>

View File

@ -1,3 +1,5 @@
import "pkg:/source/utils/config.brs"
sub init()
m.top.itemComponentName = "ConfigItem"

View File

@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="ConfigList" extends="MarkupList">
<interface>
<field id="configItems" type="nodearray" onChange="setData" />
</interface>
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="ConfigList.brs" />
</component>
</component>

View File

@ -15,7 +15,6 @@ sub itemContentChanged() as void
end sub
sub onFocusPercentChange(event)
'print "focusPercentChange: " ; event.getData()
setTextColor(event.getData())
end sub

View File

@ -6,8 +6,6 @@
<field id="focusPercent" type="float" onchange="onFocusPercentChange" />
</interface>
<script type="text/brightscript" uri="JFServer.brs" />
<children>
<Poster id="poster" translation="[0,5]" width="90" height="90" />
<Group id="labels" translation="[100,0]">
@ -19,4 +17,4 @@
</Group>
</children>
</component>
</component>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="LoginScene" extends="JFGroup">
<children>
<label text="Enter Configuration"
@ -30,5 +30,4 @@
duration="3"
repeat="true" />
</children>
<script type="text/brightscript" uri="LoginScene.brs"/>
</component>
</component>

View File

@ -1,7 +1,10 @@
import "pkg:/source/roku_modules/log/LogMixin.brs"
'
' Task used to discover jellyfin servers on the local network
'
sub init()
m.log = log.Logger("ServerDiscoveryTask")
m.top.functionName = "execute"
end sub
@ -36,7 +39,7 @@ sub execute()
end while
m.top.content = m.servers
print m.servers[0], m.servers[1], m.servers[2]
m.log.debug("Jellyfin servers found", m.servers[0], m.servers[1], m.servers[2])
end sub
sub AddServer(server)
@ -75,9 +78,9 @@ sub ProcessClientDiscoveryResponse(message)
iconWidth: 120,
iconHeight: 120
})
print "Found Jellyfin server using client discovery at " + server.Address
m.log.info("Found Jellyfin server using client discovery", server.Address)
catch e
print "Error scanning for jellyfin server", message
m.log.error("Error scanning for jellyfin server", message)
end try
end if
end sub
@ -122,7 +125,7 @@ sub ProcessSSDPResponse(message)
if locationUrl = invalid
return
else if m.locationUrlMap[locationUrl] <> invalid
print "Already discovered this location " + locationUrl
m.log.warn("Already discovered this location", locationUrl)
return
end if
@ -162,7 +165,7 @@ sub ProcessSSDPResponse(message)
end if
end for
AddServer(server)
print "Found jellyfin server using SSDP and DLNA at " + server.baseUrl
m.log.info("Found jellyfin server using SSDP and DLNA", server.baseUrl)
end if
end if
end sub

View File

@ -3,5 +3,4 @@
<interface>
<field id="content" type="array" />
</interface>
<script type="text/brightscript" uri="ServerDiscoveryTask.brs" />
</component>
</component>

View File

@ -1,4 +1,8 @@
import "pkg:/source/roku_modules/log/LogMixin.brs"
import "pkg:/source/utils/config.brs"
sub init()
m.log = log.Logger("SetServerScreen")
m.top.setFocus(true)
m.spinner = m.top.findNode("spinner")
@ -14,7 +18,7 @@ sub init()
end sub
function onKeyEvent(key as string, press as boolean) as boolean
print "SetServerScreen onKeyEvent", key, press
m.log.debug("SetServerScreen onKeyEvent", key, press)
if not press then return true
handled = true

View File

@ -4,7 +4,7 @@
<field id="serverUrl" type="string" alias="serverUrlTextbox.text" />
<field id="serverWidth" alias="serverUrlOutline.width,serverUrlTextbox.width,serverUrlContainer.width,submitSizer.width" value="1620" />
<field id="serverHeight" alias="serverUrlOutline.height,serverUrlTextbox.height,serverUrlContainer.height" value="60" />
<field id="errorMessage" type="string" alias="errorMessage.text"/>
<field id="errorMessage" type="string" alias="errorMessage.text" />
</interface>
<children>
@ -25,7 +25,7 @@
<TextEditBox id="serverUrlTextbox" hintText="e.g. 192.168.1.100:8096 or https://example.com/jellyfin"></TextEditBox>
<Poster id="serverUrlOutline" visible="false" uri="pkg:/images/hd_focus.9.png" />
</Rectangle>
<label id="errorMessage" text="" font="font:MediumSystemFont" color="#ff0000FF" />
<label id="errorMessage" text="" font="font:MediumSystemFont" color="#ff0000FF" />
<LayoutGroup horizAlignment="center">
<JFButton id="submit" minChars="30" text="Submit"></JFButton>
<!--add a known width invisibile element to allow the button to be centered-->
@ -35,8 +35,4 @@
<OptionsSlider id="options" />
</children>
<script type="text/brightscript" uri="SetServerScreen.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>
</component>

View File

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="AlbumData" extends="ContentNode">
<interface>
<field id="id" type="string" />
<field id="title" type="string" />
<field id="json" type="assocarray" onChange="setFields" />
</interface>
<script type="text/brightscript" uri="AlbumData.brs" />
</component>
</component>

View File

@ -1,3 +1,7 @@
import "pkg:/source/api/Image.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
sub setFields()
json = m.top.json
m.top.id = json.id

View File

@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="ChannelData" extends="JFContentItem">
<interface>
<field id="channelID" type="string" />
</interface>
<script type="text/brightscript" uri="ChannelData.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>
</component>

View File

@ -1,3 +1,7 @@
import "pkg:/source/api/Image.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
sub setFields()
json = m.top.json

View File

@ -1,12 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="CollectionData" extends="JFContentItem">
<interface>
<field id="collectionID" type="string" />
<field id="description" type="string" />
<field id="overview" type="string" value="boxsets" />
</interface>
<script type="text/brightscript" uri="CollectionData.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>

View File

@ -1,3 +1,7 @@
import "pkg:/source/api/Image.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
sub setFields()
json = m.top.json

View File

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="FolderData" extends="JFContentItem">
<script type="text/brightscript" uri="FolderData.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>
</component>

View File

@ -1,3 +1,6 @@
import "pkg:/source/utils/config.brs"
import "pkg:/source/roku_modules/api/api.brs"
sub init()
m.top.functionName = "getFiltersTask"
end sub

View File

@ -1,11 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="GetFiltersTask" extends="Task">
<interface>
<field id="params" type="assocarray" />
<field id="filters" type="assocarray" />
</interface>
<script type="text/brightscript" uri="GetFiltersTask.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/roku_modules/api/api.brs" />
</component>

View File

@ -1,3 +1,7 @@
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
import "pkg:/source/api/Image.brs"
sub setData()
' We keep json around just as a reference,
' but ideally everything should be going through one of the interfaces

View File

@ -15,8 +15,4 @@
<field id="usePoster" type="bool" value="false" />
<field id="isWatched" type="bool" value="false" />
</interface>
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="HomeData.brs" />
</component>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="ImageData" extends="ContentNode">
<interface>
<field id="json" type="assocarray" onChange="setFields" />
@ -8,5 +8,4 @@
<field id="width" type="integer" />
<field id="url" type="string" />
</interface>
<script type="text/brightscript" uri="ImageData.brs" />
</component>
</component>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="JFContentItem" extends="ContentNode">
<interface>
<field id="favorite" type="boolean" />
@ -11,4 +11,4 @@
<field id="parentFolder" type="string" value="" />
<field id="json" type="assocarray" onChange="setFields" />
</interface>
</component>
</component>

View File

@ -1,3 +1,8 @@
import "pkg:/source/api/Image.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
import "pkg:/source/utils/misc.brs"
sub setFields()
json = m.top.json

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="MovieData" extends="JFContentItem">
<interface>
<field id="image" type="node" onChange="setPoster" />
@ -8,9 +8,4 @@
<field id="mediaSourceCount" type="integer" />
<field id="mediaSources" type="array" />
</interface>
<script type="text/brightscript" uri="MovieData.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
</component>
</component>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="MusicAlbumData" extends="JFContentItem">
<interface>
<field id="id" type="string" />
@ -6,5 +6,4 @@
<field id="image" type="node" onChange="setPoster" />
<field id="overview" type="string" />
</interface>
<script type="text/brightscript" uri="MusicAlbumData.brs" />
</component>
</component>

View File

@ -1,3 +1,7 @@
import "pkg:/source/api/Image.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
sub setFields()
json = m.top.json
m.top.id = json.id

View File

@ -1,7 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="MusicAlbumSongListData" extends="JFContentItem">
<script type="text/brightscript" uri="MusicAlbumSongListData.brs" />
<script type="text/brightscript" uri="pkg:/source/api/Image.brs" />
<script type="text/brightscript" uri="pkg:/source/api/baserequest.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>
</component>

View File

@ -1,3 +1,7 @@
import "pkg:/source/api/Image.brs"
import "pkg:/source/api/baserequest.brs"
import "pkg:/source/utils/config.brs"
sub setFields()
json = m.top.json
m.top.id = json.id

Some files were not shown because too many files have changed in this diff Show More