diff --git a/bsconfig-prod.json b/bsconfig-prod.json index 60beb9339..7720b6167 100644 --- a/bsconfig-prod.json +++ b/bsconfig-prod.json @@ -1,37 +1,30 @@ { - "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 -} \ No newline at end of file + "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/**/*"], + "autoImportComponentScript": true, + "stagingDir": "build/staging", + "retainStagingDir": true +} diff --git a/bsconfig.json b/bsconfig.json index 907df1a79..c92bda3ae 100644 --- a/bsconfig.json +++ b/bsconfig.json @@ -1,27 +1,20 @@ { - "files": [ - "manifest", - "source/**/*.*", - "components/**/*.*", - "images/**/*.*", - "resources/**/*.*", - "locale/**/*.*", - "settings/*.*" - ], - "plugins": [ - "@rokucommunity/bslint", - "roku-log-bsc-plugin" - ], - "rokuLog": { - "insertPkgPath": true - }, - "diagnosticFilters": [ - "node_modules/**/*", - "**/roku_modules/**/*" - ], - "sourceMap": true, - "autoImportComponentScript": true, - "allowBrighterScriptInBrightScript": true, - "stagingDir": "build/staging", - "retainStagingDir": true -} \ No newline at end of file + "files": [ + "manifest", + "source/**/*.*", + "components/**/*.*", + "images/**/*.*", + "resources/**/*.*", + "locale/**/*.*", + "settings/*.*" + ], + "plugins": ["@rokucommunity/bslint", "roku-log-bsc-plugin"], + "rokuLog": { + "insertPkgPath": true + }, + "diagnosticFilters": ["node_modules/**/*", "**/roku_modules/**/*"], + "sourceMap": true, + "autoImportComponentScript": true, + "stagingDir": "build/staging", + "retainStagingDir": true +} diff --git a/components/ButtonGroupHoriz.brs b/components/ButtonGroupHoriz.bs similarity index 100% rename from components/ButtonGroupHoriz.brs rename to components/ButtonGroupHoriz.bs diff --git a/components/Buttons/JFButtons.brs b/components/Buttons/JFButtons.bs similarity index 100% rename from components/Buttons/JFButtons.brs rename to components/Buttons/JFButtons.bs diff --git a/components/Buttons/TextSizeTask.brs b/components/Buttons/TextSizeTask.bs similarity index 100% rename from components/Buttons/TextSizeTask.brs rename to components/Buttons/TextSizeTask.bs diff --git a/components/Clock.bs b/components/Clock.bs index 1d7c1a823..2137a11cb 100644 --- a/components/Clock.bs +++ b/components/Clock.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() diff --git a/components/GetNextEpisodeTask.brs b/components/GetNextEpisodeTask.bs similarity index 90% rename from components/GetNextEpisodeTask.brs rename to components/GetNextEpisodeTask.bs index 84dc400c4..f1f98af79 100644 --- a/components/GetNextEpisodeTask.brs +++ b/components/GetNextEpisodeTask.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/config.bs" import "pkg:/source/api/sdk.bs" sub init() diff --git a/components/GetPlaybackInfoTask.brs b/components/GetPlaybackInfoTask.bs similarity index 97% rename from components/GetPlaybackInfoTask.brs rename to components/GetPlaybackInfoTask.bs index 147028747..d93c602bb 100644 --- a/components/GetPlaybackInfoTask.brs +++ b/components/GetPlaybackInfoTask.bs @@ -1,7 +1,7 @@ -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/utils/config.bs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/deviceCapabilities.bs" +import "pkg:/source/api/baserequest.bs" import "pkg:/source/api/sdk.bs" sub init() diff --git a/components/GetShuffleEpisodesTask.brs b/components/GetShuffleEpisodesTask.bs similarity index 88% rename from components/GetShuffleEpisodesTask.brs rename to components/GetShuffleEpisodesTask.bs index b82484cd9..b4474ad1b 100644 --- a/components/GetShuffleEpisodesTask.brs +++ b/components/GetShuffleEpisodesTask.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/config.bs" import "pkg:/source/api/sdk.bs" sub init() diff --git a/components/IconButton.brs b/components/IconButton.bs similarity index 100% rename from components/IconButton.brs rename to components/IconButton.bs diff --git a/components/ItemGrid/Alpha.brs b/components/ItemGrid/Alpha.bs similarity index 100% rename from components/ItemGrid/Alpha.brs rename to components/ItemGrid/Alpha.bs diff --git a/components/ItemGrid/FavoriteItemsTask.brs b/components/ItemGrid/FavoriteItemsTask.bs similarity index 69% rename from components/ItemGrid/FavoriteItemsTask.brs rename to components/ItemGrid/FavoriteItemsTask.bs index cd3a0bbc7..03e5012b1 100644 --- a/components/ItemGrid/FavoriteItemsTask.brs +++ b/components/ItemGrid/FavoriteItemsTask.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/UserLibrary.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/UserLibrary.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub init() m.top.functionName = "setFavoriteStatus" diff --git a/components/ItemGrid/GridItem.brs b/components/ItemGrid/GridItem.bs similarity index 98% rename from components/ItemGrid/GridItem.brs rename to components/ItemGrid/GridItem.bs index ff624e7d5..0015a8ea5 100644 --- a/components/ItemGrid/GridItem.brs +++ b/components/ItemGrid/GridItem.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/config.brs" -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/utils/misc.bs" import "pkg:/source/roku_modules/log/LogMixin.brs" sub init() diff --git a/components/ItemGrid/GridItemSmall.brs b/components/ItemGrid/GridItemSmall.bs similarity index 96% rename from components/ItemGrid/GridItemSmall.brs rename to components/ItemGrid/GridItemSmall.bs index abee74237..606f04462 100644 --- a/components/ItemGrid/GridItemSmall.brs +++ b/components/ItemGrid/GridItemSmall.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/config.bs" sub init() m.itemPoster = m.top.findNode("itemPoster") diff --git a/components/ItemGrid/ItemGrid.brs b/components/ItemGrid/ItemGrid.bs similarity index 99% rename from components/ItemGrid/ItemGrid.brs rename to components/ItemGrid/ItemGrid.bs index e740c7aac..2d9112000 100644 --- a/components/ItemGrid/ItemGrid.brs +++ b/components/ItemGrid/ItemGrid.bs @@ -1,7 +1,7 @@ -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/utils/misc.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/deviceCapabilities.bs" import "pkg:/source/roku_modules/log/LogMixin.brs" sub init() diff --git a/components/ItemGrid/ItemGridOptions.brs b/components/ItemGrid/ItemGridOptions.bs similarity index 99% rename from components/ItemGrid/ItemGridOptions.brs rename to components/ItemGrid/ItemGridOptions.bs index 3fef8cae2..7d43137da 100644 --- a/components/ItemGrid/ItemGridOptions.brs +++ b/components/ItemGrid/ItemGridOptions.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" import "pkg:/source/roku_modules/log/LogMixin.brs" sub init() diff --git a/components/ItemGrid/LoadItemsTask2.brs b/components/ItemGrid/LoadItemsTask2.bs similarity index 97% rename from components/ItemGrid/LoadItemsTask2.brs rename to components/ItemGrid/LoadItemsTask2.bs index 22d1ffd19..f4688ff10 100644 --- a/components/ItemGrid/LoadItemsTask2.brs +++ b/components/ItemGrid/LoadItemsTask2.bs @@ -1,9 +1,9 @@ -import "pkg:/source/api/Items.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/api/Items.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/utils/deviceCapabilities.bs" import "pkg:/source/roku_modules/log/LogMixin.brs" import "pkg:/source/api/sdk.bs" diff --git a/components/ItemGrid/LoadVideoContentTask.brs b/components/ItemGrid/LoadVideoContentTask.bs similarity index 98% rename from components/ItemGrid/LoadVideoContentTask.brs rename to components/ItemGrid/LoadVideoContentTask.bs index 8fc2b0792..4e65bdbd2 100644 --- a/components/ItemGrid/LoadVideoContentTask.brs +++ b/components/ItemGrid/LoadVideoContentTask.bs @@ -1,11 +1,11 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/api/Items.brs" -import "pkg:/source/api/UserLibrary.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" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/api/Items.bs" +import "pkg:/source/api/UserLibrary.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/userauth.bs" +import "pkg:/source/utils/deviceCapabilities.bs" sub init() m.user = AboutMe() diff --git a/components/ItemGrid/MovieLibraryView.brs b/components/ItemGrid/MovieLibraryView.bs similarity index 99% rename from components/ItemGrid/MovieLibraryView.brs rename to components/ItemGrid/MovieLibraryView.bs index 817573c62..1c7c498cb 100644 --- a/components/ItemGrid/MovieLibraryView.brs +++ b/components/ItemGrid/MovieLibraryView.bs @@ -1,8 +1,8 @@ -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/utils/misc.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/utils/deviceCapabilities.bs" sub setupNodes() m.options = m.top.findNode("options") diff --git a/components/ItemGrid/MusicArtistGridItem.brs b/components/ItemGrid/MusicArtistGridItem.bs similarity index 97% rename from components/ItemGrid/MusicArtistGridItem.brs rename to components/ItemGrid/MusicArtistGridItem.bs index c639d919b..96af114dc 100644 --- a/components/ItemGrid/MusicArtistGridItem.brs +++ b/components/ItemGrid/MusicArtistGridItem.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/config.bs" sub init() m.itemPoster = m.top.findNode("itemPoster") diff --git a/components/ItemGrid/MusicLibraryView.brs b/components/ItemGrid/MusicLibraryView.bs similarity index 99% rename from components/ItemGrid/MusicLibraryView.brs rename to components/ItemGrid/MusicLibraryView.bs index 1573a016e..1f7d27ee7 100644 --- a/components/ItemGrid/MusicLibraryView.brs +++ b/components/ItemGrid/MusicLibraryView.bs @@ -1,8 +1,8 @@ -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/utils/misc.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/utils/deviceCapabilities.bs" sub setupNodes() m.options = m.top.findNode("options") diff --git a/components/JFButton.brs b/components/JFButton.bs similarity index 100% rename from components/JFButton.brs rename to components/JFButton.bs diff --git a/components/JFGroup.brs b/components/JFGroup.bs similarity index 100% rename from components/JFGroup.brs rename to components/JFGroup.bs diff --git a/components/JFMessageDialog.brs b/components/JFMessageDialog.bs similarity index 100% rename from components/JFMessageDialog.brs rename to components/JFMessageDialog.bs diff --git a/components/JFOverhang.brs b/components/JFOverhang.bs similarity index 99% rename from components/JFOverhang.brs rename to components/JFOverhang.bs index d118b22c1..360773e16 100644 --- a/components/JFOverhang.brs +++ b/components/JFOverhang.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/config.bs" sub init() m.top.id = "overhang" diff --git a/components/JFScene.brs b/components/JFScene.bs similarity index 95% rename from components/JFScene.brs rename to components/JFScene.bs index a0de10169..beee34b79 100644 --- a/components/JFScene.brs +++ b/components/JFScene.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.top.backgroundColor = "#262626" '"#101010" diff --git a/components/JFScreen.brs b/components/JFScreen.bs similarity index 100% rename from components/JFScreen.brs rename to components/JFScreen.bs diff --git a/components/JFVideo.brs b/components/JFVideo.bs similarity index 96% rename from components/JFVideo.brs rename to components/JFVideo.bs index 5ae0af9a7..f4dfb74e8 100644 --- a/components/JFVideo.brs +++ b/components/JFVideo.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/config.bs" sub init() m.playbackTimer = m.top.findNode("playbackTimer") @@ -294,9 +294,13 @@ function onKeyEvent(key as string, press as boolean) as boolean m.top.selectPlaybackInfoPressed = true return true else if key = "OK" - ' OK will play/pause depending on current state - ' return false to allow selection during seeking - if m.top.state = "paused" + if m.nextEpisodeButton.hasfocus() and not m.top.trickPlayBar.visible + m.top.state = "finished" + hideNextEpisodeButton() + return true + else if m.top.state = "paused" + ' OK will play/pause depending on current state + ' return false to allow selection during seeking m.top.control = "resume" return false else if m.top.state = "playing" diff --git a/components/ListPoster.brs b/components/ListPoster.bs similarity index 97% rename from components/ListPoster.brs rename to components/ListPoster.bs index 6ad15ab34..2c9337a80 100644 --- a/components/ListPoster.brs +++ b/components/ListPoster.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/config.brs" -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/utils/misc.bs" sub init() m.title = m.top.findNode("title") diff --git a/components/PersonDetails.brs b/components/PersonDetails.bs similarity index 98% rename from components/PersonDetails.brs rename to components/PersonDetails.bs index 8104c7bfd..e0680bdb4 100644 --- a/components/PersonDetails.brs +++ b/components/PersonDetails.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub init() m.dscr = m.top.findNode("description") diff --git a/components/PlaybackDialog.brs b/components/PlaybackDialog.bs similarity index 100% rename from components/PlaybackDialog.brs rename to components/PlaybackDialog.bs diff --git a/components/PlayedCheckmark.brs b/components/PlayedCheckmark.bs similarity index 100% rename from components/PlayedCheckmark.brs rename to components/PlayedCheckmark.bs diff --git a/components/PlaystateTask.brs b/components/PlaystateTask.bs old mode 100755 new mode 100644 similarity index 91% rename from components/PlaystateTask.brs rename to components/PlaystateTask.bs index b9b4e8ffa..fc06ae3e1 --- a/components/PlaystateTask.brs +++ b/components/PlaystateTask.bs @@ -1,54 +1,54 @@ -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" - -sub init() - m.top.functionName = "PlaystateUpdate" -end sub - -sub PlaystateUpdate() - if m.top.status = "start" - url = "Sessions/Playing" - else if m.top.status = "stop" - url = "Sessions/Playing/Stopped" - else if m.top.status = "update" - url = "Sessions/Playing/Progress" - else - ' Unknown State - return - end if - params = PlaystateDefaults(m.top.params) - resp = APIRequest(url) - postJson(resp, params) -end sub - -function PlaystateDefaults(params = {} as object) - new_params = { - '"CanSeek": false - '"Item": "{}", ' TODO! - '"NowPlayingQueue": "[]", ' TODO! - '"PlaylistItemId": "", - '"ItemId": id, - '"SessionId": "", ' TODO! - '"MediaSourceId": id, - '"AudioStreamIndex": 1, - '"SubtitleStreamIndex": 0, - "IsPaused": false, - '"IsMuted": false, - "PositionTicks": 0 - '"PlaybackStartTimeTicks": 0, - '"VolumeLevel": 100, - '"Brightness": 100, - '"AspectRatio": "16x9", - '"PlayMethod": "DirectStream" - '"LiveStreamId": "", - '"PlaySessionId": "", - '"RepeatMode": "RepeatNone" - } - - paramsArray = params.items() - for i = 0 to paramsArray.count() - 1 - item = paramsArray[i] - new_params[item.key] = item.value - end for - return FormatJson(new_params) -end function +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" + +sub init() + m.top.functionName = "PlaystateUpdate" +end sub + +sub PlaystateUpdate() + if m.top.status = "start" + url = "Sessions/Playing" + else if m.top.status = "stop" + url = "Sessions/Playing/Stopped" + else if m.top.status = "update" + url = "Sessions/Playing/Progress" + else + ' Unknown State + return + end if + params = PlaystateDefaults(m.top.params) + resp = APIRequest(url) + postJson(resp, params) +end sub + +function PlaystateDefaults(params = {} as object) + new_params = { + '"CanSeek": false + '"Item": "{}", ' TODO! + '"NowPlayingQueue": "[]", ' TODO! + '"PlaylistItemId": "", + '"ItemId": id, + '"SessionId": "", ' TODO! + '"MediaSourceId": id, + '"AudioStreamIndex": 1, + '"SubtitleStreamIndex": 0, + "IsPaused": false, + '"IsMuted": false, + "PositionTicks": 0 + '"PlaybackStartTimeTicks": 0, + '"VolumeLevel": 100, + '"Brightness": 100, + '"AspectRatio": "16x9", + '"PlayMethod": "DirectStream" + '"LiveStreamId": "", + '"PlaySessionId": "", + '"RepeatMode": "RepeatNone" + } + + paramsArray = params.items() + for i = 0 to paramsArray.count() - 1 + item = paramsArray[i] + new_params[item.key] = item.value + end for + return FormatJson(new_params) +end function diff --git a/components/RadioDialog.brs b/components/RadioDialog.bs similarity index 99% rename from components/RadioDialog.brs rename to components/RadioDialog.bs index a3250a5e9..9d79a0ee8 100644 --- a/components/RadioDialog.brs +++ b/components/RadioDialog.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.contentArea = m.top.findNode("contentArea") diff --git a/components/SearchBox.brs b/components/SearchBox.bs similarity index 81% rename from components/SearchBox.brs rename to components/SearchBox.bs index c9c14ebc7..e745a269d 100644 --- a/components/SearchBox.brs +++ b/components/SearchBox.bs @@ -1,8 +1,8 @@ -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" +import "pkg:/source/api/Items.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/utils/deviceCapabilities.bs" sub init() m.top.layoutDirection = "vert" diff --git a/components/Spinner.brs b/components/Spinner.bs similarity index 100% rename from components/Spinner.brs rename to components/Spinner.bs diff --git a/components/StandardDialog.brs b/components/StandardDialog.bs similarity index 100% rename from components/StandardDialog.brs rename to components/StandardDialog.bs diff --git a/components/WhatsNewDialog.brs b/components/WhatsNewDialog.bs similarity index 100% rename from components/WhatsNewDialog.brs rename to components/WhatsNewDialog.bs diff --git a/components/captionTask.brs b/components/captionTask.bs similarity index 98% rename from components/captionTask.brs rename to components/captionTask.bs index 37841134a..8ea8e9b4f 100644 --- a/components/captionTask.brs +++ b/components/captionTask.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/config.brs" -import "pkg:/source/api/baserequest.brs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/baserequest.bs" sub init() m.top.observeField("url", "fetchCaption") diff --git a/components/config/ConfigData.brs b/components/config/ConfigData.bs similarity index 100% rename from components/config/ConfigData.brs rename to components/config/ConfigData.bs diff --git a/components/config/ConfigItem.brs b/components/config/ConfigItem.bs similarity index 100% rename from components/config/ConfigItem.brs rename to components/config/ConfigItem.bs diff --git a/components/config/ConfigList.brs b/components/config/ConfigList.bs similarity index 97% rename from components/config/ConfigList.brs rename to components/config/ConfigList.bs index 4e015df0a..3c18d3771 100644 --- a/components/config/ConfigList.brs +++ b/components/config/ConfigList.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/config.bs" sub init() m.top.itemComponentName = "ConfigItem" diff --git a/components/config/JFServer.brs b/components/config/JFServer.bs similarity index 100% rename from components/config/JFServer.brs rename to components/config/JFServer.bs diff --git a/components/config/LoginScene.brs b/components/config/LoginScene.bs similarity index 100% rename from components/config/LoginScene.brs rename to components/config/LoginScene.bs diff --git a/components/config/ServerDiscoveryTask.brs b/components/config/ServerDiscoveryTask.bs similarity index 100% rename from components/config/ServerDiscoveryTask.brs rename to components/config/ServerDiscoveryTask.bs diff --git a/components/config/SetServerScreen.brs b/components/config/SetServerScreen.bs similarity index 99% rename from components/config/SetServerScreen.brs rename to components/config/SetServerScreen.bs index 34c4250a4..c58507252 100644 --- a/components/config/SetServerScreen.brs +++ b/components/config/SetServerScreen.bs @@ -1,5 +1,5 @@ import "pkg:/source/roku_modules/log/LogMixin.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/config.bs" sub init() m.log = log.Logger("SetServerScreen") diff --git a/components/data/AlbumData.brs b/components/data/AlbumData.bs similarity index 100% rename from components/data/AlbumData.brs rename to components/data/AlbumData.bs diff --git a/components/data/ChannelData.brs b/components/data/ChannelData.bs similarity index 85% rename from components/data/ChannelData.brs rename to components/data/ChannelData.bs index 5151efa93..ff4ec8189 100644 --- a/components/data/ChannelData.brs +++ b/components/data/ChannelData.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json diff --git a/components/data/CollectionData.brs b/components/data/CollectionData.bs similarity index 91% rename from components/data/CollectionData.brs rename to components/data/CollectionData.bs index 6d0c79428..4cce7d183 100644 --- a/components/data/CollectionData.brs +++ b/components/data/CollectionData.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json diff --git a/components/data/FolderData.brs b/components/data/FolderData.bs similarity index 89% rename from components/data/FolderData.brs rename to components/data/FolderData.bs index 89eacbf7e..7e6da642e 100644 --- a/components/data/FolderData.brs +++ b/components/data/FolderData.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json diff --git a/components/data/GetFiltersTask.brs b/components/data/GetFiltersTask.bs similarity index 84% rename from components/data/GetFiltersTask.brs rename to components/data/GetFiltersTask.bs index 5159a6da3..05e55b50a 100644 --- a/components/data/GetFiltersTask.brs +++ b/components/data/GetFiltersTask.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/config.bs" import "pkg:/source/api/sdk.bs" sub init() diff --git a/components/data/HomeData.brs b/components/data/HomeData.bs similarity index 97% rename from components/data/HomeData.brs rename to components/data/HomeData.bs index bba8aeca9..8563bc85b 100644 --- a/components/data/HomeData.brs +++ b/components/data/HomeData.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" -import "pkg:/source/api/Image.brs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/Image.bs" sub setData() ' We keep json around just as a reference, diff --git a/components/data/ImageData.brs b/components/data/ImageData.bs similarity index 100% rename from components/data/ImageData.brs rename to components/data/ImageData.bs diff --git a/components/data/MovieData.brs b/components/data/MovieData.bs similarity index 94% rename from components/data/MovieData.brs rename to components/data/MovieData.bs index 65b5681ec..cba66f815 100644 --- a/components/data/MovieData.brs +++ b/components/data/MovieData.bs @@ -1,7 +1,7 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" -import "pkg:/source/utils/misc.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/utils/misc.bs" sub setFields() json = m.top.json diff --git a/components/data/MusicAlbumData.brs b/components/data/MusicAlbumData.bs similarity index 100% rename from components/data/MusicAlbumData.brs rename to components/data/MusicAlbumData.bs diff --git a/components/data/MusicAlbumSongListData.brs b/components/data/MusicAlbumSongListData.bs similarity index 91% rename from components/data/MusicAlbumSongListData.brs rename to components/data/MusicAlbumSongListData.bs index 3578441c8..9583cdb4f 100644 --- a/components/data/MusicAlbumSongListData.brs +++ b/components/data/MusicAlbumSongListData.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json diff --git a/components/data/MusicArtistData.brs b/components/data/MusicArtistData.bs similarity index 91% rename from components/data/MusicArtistData.brs rename to components/data/MusicArtistData.bs index 94b09c296..6f36dc9b5 100644 --- a/components/data/MusicArtistData.brs +++ b/components/data/MusicArtistData.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json diff --git a/components/data/MusicSongData.brs b/components/data/MusicSongData.bs similarity index 100% rename from components/data/MusicSongData.brs rename to components/data/MusicSongData.bs diff --git a/components/data/OptionsButton.brs b/components/data/OptionsButton.bs similarity index 51% rename from components/data/OptionsButton.brs rename to components/data/OptionsButton.bs index 1f8366a4d..e103abdf3 100644 --- a/components/data/OptionsButton.brs +++ b/components/data/OptionsButton.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/config.bs" sub init() end sub diff --git a/components/data/OptionsData.brs b/components/data/OptionsData.bs similarity index 96% rename from components/data/OptionsData.brs rename to components/data/OptionsData.bs index a7c65852c..980d34f00 100644 --- a/components/data/OptionsData.brs +++ b/components/data/OptionsData.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/config.bs" sub init() m.top.value_index = 0 diff --git a/components/data/PersonData.brs b/components/data/PersonData.bs similarity index 92% rename from components/data/PersonData.brs rename to components/data/PersonData.bs index c4e25fe52..71745b06f 100644 --- a/components/data/PersonData.brs +++ b/components/data/PersonData.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json diff --git a/components/data/PhotoData.brs b/components/data/PhotoData.bs similarity index 91% rename from components/data/PhotoData.brs rename to components/data/PhotoData.bs index 16971e84d..30443f3df 100644 --- a/components/data/PhotoData.brs +++ b/components/data/PhotoData.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json diff --git a/components/data/PlaylistData.brs b/components/data/PlaylistData.bs similarity index 100% rename from components/data/PlaylistData.brs rename to components/data/PlaylistData.bs diff --git a/components/data/PublicUserData.brs b/components/data/PublicUserData.bs similarity index 100% rename from components/data/PublicUserData.brs rename to components/data/PublicUserData.bs diff --git a/components/data/SceneManager.brs b/components/data/SceneManager.bs old mode 100755 new mode 100644 similarity index 96% rename from components/data/SceneManager.brs rename to components/data/SceneManager.bs index e294ba390..71f36a2fa --- a/components/data/SceneManager.brs +++ b/components/data/SceneManager.bs @@ -1,354 +1,354 @@ -import "pkg:/source/roku_modules/log/LogMixin.brs" - -sub init() - m.log = log.Logger("SceneManager") - m.groups = [] - m.scene = m.top.getScene() - m.content = m.scene.findNode("content") - m.overhang = m.scene.findNode("overhang") -end sub - -' -' Push a new group onto the stack, replacing the existing group on the screen -sub pushScene(newGroup) - - currentGroup = m.groups.peek() - if newGroup <> invalid - if currentGroup <> invalid - 'Search through group and store off last focused item - if currentGroup.focusedChild <> invalid - focused = currentGroup.focusedChild - while focused.hasFocus() = false - focused = focused.focusedChild - end while - - currentGroup.lastFocus = focused - currentGroup.setFocus(false) - else - currentGroup.setFocus(false) - end if - - if currentGroup.isSubType("JFGroup") - unregisterOverhangData(currentGroup) - end if - - currentGroup.visible = false - - if currentGroup.isSubType("JFScreen") - currentGroup.callFunc("OnScreenHidden") - end if - - end if - - m.groups.push(newGroup) - - if currentGroup <> invalid - m.content.replaceChild(newGroup, 0) - else - m.content.appendChild(newGroup) - end if - - if newGroup.isSubType("JFScreen") - newGroup.callFunc("OnScreenShown") - end if - - 'observe info about new group, set overhang title, etc. - if newGroup.isSubType("JFGroup") - registerOverhangData(newGroup) - - ' Some groups set focus to a specific component within init(), so we don't want to - ' change if that is the case. - if newGroup.isInFocusChain() = false - newGroup.setFocus(true) - end if - else if newGroup.isSubType("JFVideo") - newGroup.setFocus(true) - newGroup.control = "play" - m.overhang.visible = false - end if - else - currentGroup.focusedChild.setFocus(true) - end if - -end sub - -' -' Remove the current group and load the last group from the stack -sub popScene() - group = m.groups.pop() - if group <> invalid - if group.isSubType("JFGroup") - unregisterOverhangData(group) - else if group.isSubType("JFVideo") - ' Stop video to make sure app communicates stop playstate to server - group.control = "stop" - end if - - group.visible = false - - if group.isSubType("JFScreen") - group.callFunc("OnScreenHidden") - end if - else - ' Exit app if for some reason we don't have anything on the stack - m.scene.exit = true - end if - - group = m.groups.peek() - if group <> invalid - registerOverhangData(group) - - group.visible = true - - m.content.replaceChild(group, 0) - - if group.isSubType("JFScreen") - group.callFunc("OnScreenShown") - else - ' Restore focus - if group.lastFocus <> invalid - group.lastFocus.setFocus(true) - else - if group.focusedChild <> invalid - group.focusedChild.setFocus(true) - else - group.setFocus(true) - end if - end if - end if - else - ' Exit app if the stack is empty after removing group - m.scene.exit = true - end if - -end sub - - -' -' Return group at top of stack without removing -function getActiveScene() as object - return m.groups.peek() -end function - - -' -' Clear all content from group stack -sub clearScenes() - if m.content <> invalid then m.content.removeChildrenIndex(m.content.getChildCount(), 0) - for each group in m.groups - if LCase(group.subtype()) = "jfscreen" - group.callFunc("OnScreenHidden") - end if - end for - m.groups = [] -end sub - -' -' Clear previous scene from group stack -sub clearPreviousScene() - m.groups.pop() -end sub - -' -' Delete scene from group stack at passed index -sub deleteSceneAtIndex(index = 1) - m.groups.Delete(index) -end sub - -' -' Display user/device settings screen -sub settings() - settingsScreen = createObject("roSGNode", "Settings") - pushScene(settingsScreen) -end sub - -' -' Register observers for overhang data -sub registerOverhangData(group) - if group.isSubType("JFGroup") - if group.overhangTitle <> invalid then m.overhang.title = group.overhangTitle - - if group.optionsAvailable - m.overhang.showOptions = true - else - m.overhang.showOptions = false - end if - group.observeField("optionsAvailable", "updateOptions") - - group.observeField("overhangTitle", "updateOverhangTitle") - - if group.overhangVisible - m.overhang.visible = true - else - m.overhang.visible = false - end if - group.observeField("overhangVisible", "updateOverhangVisible") - else if group.isSubType("JFVideo") - m.overhang.visible = false - else - m.log.error("registerOverhangData(): Unexpected group type.", group, group.subtype()) - end if -end sub - - -' -' Remove observers for overhang data -sub unregisterOverhangData(group) - group.unobserveField("overhangTitle") -end sub - - -' -' Update overhang title -sub updateOverhangTitle(msg) - m.overhang.title = msg.getData() -end sub - - -' -' Update options availability -sub updateOptions(msg) - m.overhang.showOptions = msg.getData() -end sub - - -' -' Update whether the overhang is visible or not -sub updateOverhangVisible(msg) - m.overhang.visible = msg.getData() -end sub - - -' -' Update username in overhang -sub updateUser() - ' Passthrough to overhang - if m.overhang <> invalid then m.overhang.currentUser = m.top.currentUser -end sub - - -' -' Reset time -sub resetTime() - ' Passthrough to overhang - m.overhang.callFunc("resetTime") -end sub - -' -' Display dialog to user with an OK button -sub userMessage(title as string, message as string) - dialog = createObject("roSGNode", "StandardMessageDialog") - dialog.title = title - dialog.message = message - dialog.buttons = [tr("OK")] - dialog.observeField("buttonSelected", "dismissDialog") - m.scene.dialog = dialog -end sub - -' -' Display dialog to user with an OK button -sub standardDialog(title, message) - dialog = createObject("roSGNode", "StandardDialog") - dlgPalette = createObject("roSGNode", "RSGPalette") - dlgPalette.colors = { - DialogBackgroundColor: "0x262828FF", - DialogFocusColor: "0xcececeFF", - DialogFocusItemColor: "0x202020FF", - DialogSecondaryTextColor: "0xf8f8f8ff", - DialogSecondaryItemColor: "#00a4dcFF", - DialogTextColor: "0xeeeeeeFF" - } - dialog.palette = dlgPalette - dialog.observeField("buttonSelected", "dismissDialog") - dialog.title = title - dialog.contentData = message - dialog.buttons = [tr("OK")] - - m.scene.dialog = dialog -end sub - -' -' Display dialog to user with an OK button -sub radioDialog(title, message) - dialog = createObject("roSGNode", "RadioDialog") - dlgPalette = createObject("roSGNode", "RSGPalette") - dlgPalette.colors = { - DialogBackgroundColor: "0x262828FF", - DialogFocusColor: "0xcececeFF", - DialogFocusItemColor: "0x202020FF", - DialogSecondaryTextColor: "0xf8f8f8ff", - DialogSecondaryItemColor: "#00a4dcFF", - DialogTextColor: "0xeeeeeeFF" - } - dialog.palette = dlgPalette - dialog.observeField("buttonSelected", "dismissDialog") - dialog.title = title - dialog.contentData = message - dialog.buttons = [tr("OK")] - - m.scene.dialog = dialog -end sub - -' -' Display dialog to user with an OK button -sub optionDialog(title, message, buttons) - m.top.dataReturned = false - m.top.returnData = invalid - m.userselection = false - - dialog = createObject("roSGNode", "StandardMessageDialog") - dlgPalette = createObject("roSGNode", "RSGPalette") - dlgPalette.colors = { - DialogBackgroundColor: "0x262828FF", - DialogFocusColor: "0xcececeFF", - DialogFocusItemColor: "0x202020FF", - DialogSecondaryTextColor: "0xf8f8f8ff", - DialogSecondaryItemColor: "#00a4dcFF", - DialogTextColor: "0xeeeeeeFF" - } - dialog.palette = dlgPalette - dialog.observeField("buttonSelected", "optionSelected") - dialog.observeField("wasClosed", "optionClosed") - dialog.title = title - dialog.message = message - dialog.buttons = buttons - - m.scene.dialog = dialog -end sub - -' -' Return button the user selected -sub optionClosed() - if m.userselection then return - - m.top.returnData = { - indexSelected: -1, - buttonSelected: "" - } - m.top.dataReturned = true -end sub - -' -' Return button the user selected -sub optionSelected() - m.userselection = true - m.top.returnData = { - indexSelected: m.scene.dialog.buttonSelected, - buttonSelected: m.scene.dialog.buttons[m.scene.dialog.buttonSelected] - } - m.top.dataReturned = true - - dismissDialog() -end sub - -' -' Close currently displayed dialog -sub dismissDialog() - m.scene.dialog.close = true -end sub - -' -' Returns bool indicating if dialog is currently displayed -function isDialogOpen() as boolean - return m.scene.dialog <> invalid -end function +import "pkg:/source/roku_modules/log/LogMixin.brs" + +sub init() + m.log = log.Logger("SceneManager") + m.groups = [] + m.scene = m.top.getScene() + m.content = m.scene.findNode("content") + m.overhang = m.scene.findNode("overhang") +end sub + +' +' Push a new group onto the stack, replacing the existing group on the screen +sub pushScene(newGroup) + + currentGroup = m.groups.peek() + if newGroup <> invalid + if currentGroup <> invalid + 'Search through group and store off last focused item + if currentGroup.focusedChild <> invalid + focused = currentGroup.focusedChild + while focused.hasFocus() = false + focused = focused.focusedChild + end while + + currentGroup.lastFocus = focused + currentGroup.setFocus(false) + else + currentGroup.setFocus(false) + end if + + if currentGroup.isSubType("JFGroup") + unregisterOverhangData(currentGroup) + end if + + currentGroup.visible = false + + if currentGroup.isSubType("JFScreen") + currentGroup.callFunc("OnScreenHidden") + end if + + end if + + m.groups.push(newGroup) + + if currentGroup <> invalid + m.content.replaceChild(newGroup, 0) + else + m.content.appendChild(newGroup) + end if + + if newGroup.isSubType("JFScreen") + newGroup.callFunc("OnScreenShown") + end if + + 'observe info about new group, set overhang title, etc. + if newGroup.isSubType("JFGroup") + registerOverhangData(newGroup) + + ' Some groups set focus to a specific component within init(), so we don't want to + ' change if that is the case. + if newGroup.isInFocusChain() = false + newGroup.setFocus(true) + end if + else if newGroup.isSubType("JFVideo") + newGroup.setFocus(true) + newGroup.control = "play" + m.overhang.visible = false + end if + else + currentGroup.focusedChild.setFocus(true) + end if + +end sub + +' +' Remove the current group and load the last group from the stack +sub popScene() + group = m.groups.pop() + if group <> invalid + if group.isSubType("JFGroup") + unregisterOverhangData(group) + else if group.isSubType("JFVideo") + ' Stop video to make sure app communicates stop playstate to server + group.control = "stop" + end if + + group.visible = false + + if group.isSubType("JFScreen") + group.callFunc("OnScreenHidden") + end if + else + ' Exit app if for some reason we don't have anything on the stack + m.scene.exit = true + end if + + group = m.groups.peek() + if group <> invalid + registerOverhangData(group) + + group.visible = true + + m.content.replaceChild(group, 0) + + if group.isSubType("JFScreen") + group.callFunc("OnScreenShown") + else + ' Restore focus + if group.lastFocus <> invalid + group.lastFocus.setFocus(true) + else + if group.focusedChild <> invalid + group.focusedChild.setFocus(true) + else + group.setFocus(true) + end if + end if + end if + else + ' Exit app if the stack is empty after removing group + m.scene.exit = true + end if + +end sub + + +' +' Return group at top of stack without removing +function getActiveScene() as object + return m.groups.peek() +end function + + +' +' Clear all content from group stack +sub clearScenes() + if m.content <> invalid then m.content.removeChildrenIndex(m.content.getChildCount(), 0) + for each group in m.groups + if LCase(group.subtype()) = "jfscreen" + group.callFunc("OnScreenHidden") + end if + end for + m.groups = [] +end sub + +' +' Clear previous scene from group stack +sub clearPreviousScene() + m.groups.pop() +end sub + +' +' Delete scene from group stack at passed index +sub deleteSceneAtIndex(index = 1) + m.groups.Delete(index) +end sub + +' +' Display user/device settings screen +sub settings() + settingsScreen = createObject("roSGNode", "Settings") + pushScene(settingsScreen) +end sub + +' +' Register observers for overhang data +sub registerOverhangData(group) + if group.isSubType("JFGroup") + if group.overhangTitle <> invalid then m.overhang.title = group.overhangTitle + + if group.optionsAvailable + m.overhang.showOptions = true + else + m.overhang.showOptions = false + end if + group.observeField("optionsAvailable", "updateOptions") + + group.observeField("overhangTitle", "updateOverhangTitle") + + if group.overhangVisible + m.overhang.visible = true + else + m.overhang.visible = false + end if + group.observeField("overhangVisible", "updateOverhangVisible") + else if group.isSubType("JFVideo") + m.overhang.visible = false + else + m.log.error("registerOverhangData(): Unexpected group type.", group, group.subtype()) + end if +end sub + + +' +' Remove observers for overhang data +sub unregisterOverhangData(group) + group.unobserveField("overhangTitle") +end sub + + +' +' Update overhang title +sub updateOverhangTitle(msg) + m.overhang.title = msg.getData() +end sub + + +' +' Update options availability +sub updateOptions(msg) + m.overhang.showOptions = msg.getData() +end sub + + +' +' Update whether the overhang is visible or not +sub updateOverhangVisible(msg) + m.overhang.visible = msg.getData() +end sub + + +' +' Update username in overhang +sub updateUser() + ' Passthrough to overhang + if m.overhang <> invalid then m.overhang.currentUser = m.top.currentUser +end sub + + +' +' Reset time +sub resetTime() + ' Passthrough to overhang + m.overhang.callFunc("resetTime") +end sub + +' +' Display dialog to user with an OK button +sub userMessage(title as string, message as string) + dialog = createObject("roSGNode", "StandardMessageDialog") + dialog.title = title + dialog.message = message + dialog.buttons = [tr("OK")] + dialog.observeField("buttonSelected", "dismissDialog") + m.scene.dialog = dialog +end sub + +' +' Display dialog to user with an OK button +sub standardDialog(title, message) + dialog = createObject("roSGNode", "StandardDialog") + dlgPalette = createObject("roSGNode", "RSGPalette") + dlgPalette.colors = { + DialogBackgroundColor: "0x262828FF", + DialogFocusColor: "0xcececeFF", + DialogFocusItemColor: "0x202020FF", + DialogSecondaryTextColor: "0xf8f8f8ff", + DialogSecondaryItemColor: "#00a4dcFF", + DialogTextColor: "0xeeeeeeFF" + } + dialog.palette = dlgPalette + dialog.observeField("buttonSelected", "dismissDialog") + dialog.title = title + dialog.contentData = message + dialog.buttons = [tr("OK")] + + m.scene.dialog = dialog +end sub + +' +' Display dialog to user with an OK button +sub radioDialog(title, message) + dialog = createObject("roSGNode", "RadioDialog") + dlgPalette = createObject("roSGNode", "RSGPalette") + dlgPalette.colors = { + DialogBackgroundColor: "0x262828FF", + DialogFocusColor: "0xcececeFF", + DialogFocusItemColor: "0x202020FF", + DialogSecondaryTextColor: "0xf8f8f8ff", + DialogSecondaryItemColor: "#00a4dcFF", + DialogTextColor: "0xeeeeeeFF" + } + dialog.palette = dlgPalette + dialog.observeField("buttonSelected", "dismissDialog") + dialog.title = title + dialog.contentData = message + dialog.buttons = [tr("OK")] + + m.scene.dialog = dialog +end sub + +' +' Display dialog to user with an OK button +sub optionDialog(title, message, buttons) + m.top.dataReturned = false + m.top.returnData = invalid + m.userselection = false + + dialog = createObject("roSGNode", "StandardMessageDialog") + dlgPalette = createObject("roSGNode", "RSGPalette") + dlgPalette.colors = { + DialogBackgroundColor: "0x262828FF", + DialogFocusColor: "0xcececeFF", + DialogFocusItemColor: "0x202020FF", + DialogSecondaryTextColor: "0xf8f8f8ff", + DialogSecondaryItemColor: "#00a4dcFF", + DialogTextColor: "0xeeeeeeFF" + } + dialog.palette = dlgPalette + dialog.observeField("buttonSelected", "optionSelected") + dialog.observeField("wasClosed", "optionClosed") + dialog.title = title + dialog.message = message + dialog.buttons = buttons + + m.scene.dialog = dialog +end sub + +' +' Return button the user selected +sub optionClosed() + if m.userselection then return + + m.top.returnData = { + indexSelected: -1, + buttonSelected: "" + } + m.top.dataReturned = true +end sub + +' +' Return button the user selected +sub optionSelected() + m.userselection = true + m.top.returnData = { + indexSelected: m.scene.dialog.buttonSelected, + buttonSelected: m.scene.dialog.buttons[m.scene.dialog.buttonSelected] + } + m.top.dataReturned = true + + dismissDialog() +end sub + +' +' Close currently displayed dialog +sub dismissDialog() + m.scene.dialog.close = true +end sub + +' +' Returns bool indicating if dialog is currently displayed +function isDialogOpen() as boolean + return m.scene.dialog <> invalid +end function diff --git a/components/data/ScheduleProgramData.brs b/components/data/ScheduleProgramData.bs similarity index 92% rename from components/data/ScheduleProgramData.brs rename to components/data/ScheduleProgramData.bs index 5da1c3932..c27126208 100644 --- a/components/data/ScheduleProgramData.brs +++ b/components/data/ScheduleProgramData.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json diff --git a/components/data/SearchData.brs b/components/data/SearchData.bs similarity index 100% rename from components/data/SearchData.brs rename to components/data/SearchData.bs diff --git a/components/data/SeriesData.brs b/components/data/SeriesData.bs similarity index 93% rename from components/data/SeriesData.brs rename to components/data/SeriesData.bs index ce660845b..f3671f381 100644 --- a/components/data/SeriesData.brs +++ b/components/data/SeriesData.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json diff --git a/components/data/TVEpisode.brs b/components/data/TVEpisode.bs similarity index 83% rename from components/data/TVEpisode.brs rename to components/data/TVEpisode.bs index a296d86ec..6c0542c0c 100644 --- a/components/data/TVEpisode.brs +++ b/components/data/TVEpisode.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json diff --git a/components/data/TVEpisodeData.brs b/components/data/TVEpisodeData.bs similarity index 100% rename from components/data/TVEpisodeData.brs rename to components/data/TVEpisodeData.bs diff --git a/components/data/TVSeasonData.brs b/components/data/TVSeasonData.bs similarity index 100% rename from components/data/TVSeasonData.brs rename to components/data/TVSeasonData.bs diff --git a/components/data/UserData.brs b/components/data/UserData.bs similarity index 97% rename from components/data/UserData.brs rename to components/data/UserData.bs index 446abbf38..e20262e0b 100644 --- a/components/data/UserData.brs +++ b/components/data/UserData.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/config.bs" sub setDataFromJSON() json = m.top.json diff --git a/components/data/VideoData.brs b/components/data/VideoData.bs similarity index 83% rename from components/data/VideoData.brs rename to components/data/VideoData.bs index 49c6d7526..1a7654035 100644 --- a/components/data/VideoData.brs +++ b/components/data/VideoData.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub setFields() json = m.top.json diff --git a/components/extras/ExtrasItem.brs b/components/extras/ExtrasItem.bs similarity index 100% rename from components/extras/ExtrasItem.brs rename to components/extras/ExtrasItem.bs diff --git a/components/extras/ExtrasRowList.brs b/components/extras/ExtrasRowList.bs similarity index 100% rename from components/extras/ExtrasRowList.brs rename to components/extras/ExtrasRowList.bs diff --git a/components/home/Home.brs b/components/home/Home.bs similarity index 89% rename from components/home/Home.brs rename to components/home/Home.bs index 67dcdeb88..c131b1822 100644 --- a/components/home/Home.brs +++ b/components/home/Home.bs @@ -1,7 +1,7 @@ -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" -import "pkg:/source/utils/misc.brs" -import "pkg:/source/utils/deviceCapabilities.brs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/deviceCapabilities.bs" sub init() m.isFirstRun = true diff --git a/components/home/HomeItem.brs b/components/home/HomeItem.bs similarity index 98% rename from components/home/HomeItem.brs rename to components/home/HomeItem.bs index 29c2f1342..7903318b9 100644 --- a/components/home/HomeItem.brs +++ b/components/home/HomeItem.bs @@ -1,7 +1,7 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" -import "pkg:/source/utils/misc.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/utils/misc.bs" import "pkg:/source/roku_modules/log/LogMixin.brs" sub init() diff --git a/components/home/HomeRows.brs b/components/home/HomeRows.bs similarity index 99% rename from components/home/HomeRows.brs rename to components/home/HomeRows.bs index 609c42b89..9d5fcba3c 100644 --- a/components/home/HomeRows.brs +++ b/components/home/HomeRows.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.top.itemComponentName = "HomeItem" diff --git a/components/home/LoadItemsTask.brs b/components/home/LoadItemsTask.bs similarity index 97% rename from components/home/LoadItemsTask.brs rename to components/home/LoadItemsTask.bs index 1ea788439..369ce7b43 100644 --- a/components/home/LoadItemsTask.brs +++ b/components/home/LoadItemsTask.bs @@ -1,9 +1,9 @@ -import "pkg:/source/api/Items.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" -import "pkg:/source/utils/misc.brs" -import "pkg:/source/utils/deviceCapabilities.brs" -import "pkg:/source/api/Image.brs" +import "pkg:/source/api/Items.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/deviceCapabilities.bs" +import "pkg:/source/api/Image.bs" import "pkg:/source/api/sdk.bs" sub init() diff --git a/components/liveTv/LoadChannelsTask.brs b/components/liveTv/LoadChannelsTask.bs similarity index 95% rename from components/liveTv/LoadChannelsTask.brs rename to components/liveTv/LoadChannelsTask.bs index 482188bdf..7d00651d6 100644 --- a/components/liveTv/LoadChannelsTask.brs +++ b/components/liveTv/LoadChannelsTask.bs @@ -1,5 +1,5 @@ -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub init() m.top.functionName = "loadChannels" diff --git a/components/liveTv/LoadProgramDetailsTask.brs b/components/liveTv/LoadProgramDetailsTask.bs similarity index 93% rename from components/liveTv/LoadProgramDetailsTask.brs rename to components/liveTv/LoadProgramDetailsTask.bs index 686dba863..3d7ec56ed 100644 --- a/components/liveTv/LoadProgramDetailsTask.brs +++ b/components/liveTv/LoadProgramDetailsTask.bs @@ -1,5 +1,5 @@ -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub init() m.top.functionName = "loadProgramDetails" diff --git a/components/liveTv/LoadSheduleTask.brs b/components/liveTv/LoadSheduleTask.bs similarity index 93% rename from components/liveTv/LoadSheduleTask.brs rename to components/liveTv/LoadSheduleTask.bs index d898f50a7..7c614d951 100644 --- a/components/liveTv/LoadSheduleTask.brs +++ b/components/liveTv/LoadSheduleTask.bs @@ -1,5 +1,5 @@ -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub init() m.top.functionName = "loadSchedule" diff --git a/components/liveTv/ProgramDetails.brs b/components/liveTv/ProgramDetails.bs similarity index 99% rename from components/liveTv/ProgramDetails.brs rename to components/liveTv/ProgramDetails.bs index 3afe92ae3..617959f18 100644 --- a/components/liveTv/ProgramDetails.brs +++ b/components/liveTv/ProgramDetails.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/config.bs" sub init() diff --git a/components/liveTv/RecordProgramTask.brs b/components/liveTv/RecordProgramTask.bs similarity index 96% rename from components/liveTv/RecordProgramTask.brs rename to components/liveTv/RecordProgramTask.bs index 81243a5e4..58ebaabc5 100644 --- a/components/liveTv/RecordProgramTask.brs +++ b/components/liveTv/RecordProgramTask.bs @@ -1,5 +1,5 @@ -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" import "pkg:/source/roku_modules/log/LogMixin.brs" sub init() diff --git a/components/liveTv/schedule.brs b/components/liveTv/schedule.bs similarity index 100% rename from components/liveTv/schedule.brs rename to components/liveTv/schedule.bs diff --git a/components/login/UserItem.brs b/components/login/UserItem.bs similarity index 100% rename from components/login/UserItem.brs rename to components/login/UserItem.bs diff --git a/components/login/UserRow.brs b/components/login/UserRow.bs similarity index 100% rename from components/login/UserRow.brs rename to components/login/UserRow.bs diff --git a/components/login/UserSelect.brs b/components/login/UserSelect.bs similarity index 100% rename from components/login/UserSelect.brs rename to components/login/UserSelect.bs diff --git a/components/manager/QueueManager.brs b/components/manager/QueueManager.bs similarity index 95% rename from components/manager/QueueManager.brs rename to components/manager/QueueManager.bs index 4a5b14b9e..8dcc921ba 100644 --- a/components/manager/QueueManager.brs +++ b/components/manager/QueueManager.bs @@ -1,10 +1,10 @@ -import "pkg:/source/utils/misc.brs" -import "ViewCreator.brs" -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" +import "pkg:/source/utils/misc.bs" +import "ViewCreator.bs" +import "pkg:/source/api/Items.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/utils/deviceCapabilities.bs" sub init() m.hold = [] diff --git a/components/manager/ViewCreator.brs b/components/manager/ViewCreator.bs similarity index 100% rename from components/manager/ViewCreator.brs rename to components/manager/ViewCreator.bs diff --git a/components/mediaPlayers/AudioPlayer.brs b/components/mediaPlayers/AudioPlayer.bs similarity index 97% rename from components/mediaPlayers/AudioPlayer.brs rename to components/mediaPlayers/AudioPlayer.bs index 4d6fc3d22..db3750082 100644 --- a/components/mediaPlayers/AudioPlayer.brs +++ b/components/mediaPlayers/AudioPlayer.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.playReported = false diff --git a/components/movies/AudioTrackListItem.brs b/components/movies/AudioTrackListItem.bs similarity index 100% rename from components/movies/AudioTrackListItem.brs rename to components/movies/AudioTrackListItem.bs diff --git a/components/movies/MovieDetails.brs b/components/movies/MovieDetails.bs similarity index 99% rename from components/movies/MovieDetails.brs rename to components/movies/MovieDetails.bs index 123a4a939..dda381f9c 100644 --- a/components/movies/MovieDetails.brs +++ b/components/movies/MovieDetails.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/config.bs" sub init() m.extrasGrp = m.top.findnode("extrasGrp") diff --git a/components/movies/MovieOptions.brs b/components/movies/MovieOptions.bs similarity index 100% rename from components/movies/MovieOptions.brs rename to components/movies/MovieOptions.bs diff --git a/components/movies/VideoTrackListItem.brs b/components/movies/VideoTrackListItem.bs similarity index 100% rename from components/movies/VideoTrackListItem.brs rename to components/movies/VideoTrackListItem.bs diff --git a/components/music/AlbumGrid.brs b/components/music/AlbumGrid.bs similarity index 98% rename from components/music/AlbumGrid.brs rename to components/music/AlbumGrid.bs index b167c5887..a7d1ef9a6 100644 --- a/components/music/AlbumGrid.brs +++ b/components/music/AlbumGrid.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() getData() diff --git a/components/music/AlbumTrackList.brs b/components/music/AlbumTrackList.bs similarity index 100% rename from components/music/AlbumTrackList.brs rename to components/music/AlbumTrackList.bs diff --git a/components/music/AlbumView.brs b/components/music/AlbumView.bs similarity index 99% rename from components/music/AlbumView.brs rename to components/music/AlbumView.bs index e5a0e2ee1..ae648a583 100644 --- a/components/music/AlbumView.brs +++ b/components/music/AlbumView.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.top.optionsAvailable = false diff --git a/components/music/ArtistView.brs b/components/music/ArtistView.bs similarity index 99% rename from components/music/ArtistView.brs rename to components/music/ArtistView.bs index 4d9365690..a3ba9fdb5 100644 --- a/components/music/ArtistView.brs +++ b/components/music/ArtistView.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.top.optionsAvailable = false diff --git a/components/music/AudioPlayerView.brs b/components/music/AudioPlayerView.bs similarity index 99% rename from components/music/AudioPlayerView.brs rename to components/music/AudioPlayerView.bs index 3047c3315..73caa78bb 100644 --- a/components/music/AudioPlayerView.brs +++ b/components/music/AudioPlayerView.bs @@ -1,7 +1,7 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub init() m.top.optionsAvailable = false diff --git a/components/music/LoadScreenSaverTimeoutTask.brs b/components/music/LoadScreenSaverTimeoutTask.bs similarity index 100% rename from components/music/LoadScreenSaverTimeoutTask.brs rename to components/music/LoadScreenSaverTimeoutTask.bs diff --git a/components/music/PlaylistView.brs b/components/music/PlaylistView.bs similarity index 99% rename from components/music/PlaylistView.brs rename to components/music/PlaylistView.bs index a912dcfb9..cc404adf3 100644 --- a/components/music/PlaylistView.brs +++ b/components/music/PlaylistView.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.top.optionsAvailable = false diff --git a/components/music/SongItem.brs b/components/music/SongItem.bs similarity index 95% rename from components/music/SongItem.brs rename to components/music/SongItem.bs index c9db0bfe0..fef324171 100644 --- a/components/music/SongItem.brs +++ b/components/music/SongItem.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.itemText = m.top.findNode("itemText") diff --git a/components/options/OptionNode.brs b/components/options/OptionNode.bs similarity index 100% rename from components/options/OptionNode.brs rename to components/options/OptionNode.bs diff --git a/components/options/OptionsSlider.brs b/components/options/OptionsSlider.bs similarity index 100% rename from components/options/OptionsSlider.brs rename to components/options/OptionsSlider.bs diff --git a/components/photos/LoadPhotoTask.brs b/components/photos/LoadPhotoTask.bs similarity index 74% rename from components/photos/LoadPhotoTask.brs rename to components/photos/LoadPhotoTask.bs index 78302fece..5f45c5481 100644 --- a/components/photos/LoadPhotoTask.brs +++ b/components/photos/LoadPhotoTask.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/utils/config.brs" -import "pkg:/source/api/baserequest.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/baserequest.bs" sub init() m.top.functionName = "loadItems" diff --git a/components/photos/PhotoDetails.brs b/components/photos/PhotoDetails.bs similarity index 98% rename from components/photos/PhotoDetails.brs rename to components/photos/PhotoDetails.bs index 93f37f44d..d2dbdf321 100644 --- a/components/photos/PhotoDetails.brs +++ b/components/photos/PhotoDetails.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/config.bs" sub init() m.top.optionsAvailable = true diff --git a/components/quickConnect/QuickConnect.brs b/components/quickConnect/QuickConnect.bs similarity index 69% rename from components/quickConnect/QuickConnect.brs rename to components/quickConnect/QuickConnect.bs index 36fbdfb24..5c0edefea 100644 --- a/components/quickConnect/QuickConnect.brs +++ b/components/quickConnect/QuickConnect.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/userauth.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/userauth.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" sub init() m.top.functionName = "monitorQuickConnect" diff --git a/components/quickConnect/QuickConnectDialog.brs b/components/quickConnect/QuickConnectDialog.bs similarity index 94% rename from components/quickConnect/QuickConnectDialog.brs rename to components/quickConnect/QuickConnectDialog.bs index defb80d91..97990ce97 100644 --- a/components/quickConnect/QuickConnectDialog.brs +++ b/components/quickConnect/QuickConnectDialog.bs @@ -1,6 +1,6 @@ -import "pkg:/source/api/userauth.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/api/userauth.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" import "pkg:/source/utils/session.bs" sub init() diff --git a/components/search/SearchResults.brs b/components/search/SearchResults.bs similarity index 93% rename from components/search/SearchResults.brs rename to components/search/SearchResults.bs index 0eddf0585..c8c7e8519 100644 --- a/components/search/SearchResults.brs +++ b/components/search/SearchResults.bs @@ -1,8 +1,8 @@ -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" +import "pkg:/source/api/Items.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/utils/deviceCapabilities.bs" sub init() m.top.optionsAvailable = false diff --git a/components/search/SearchRow.brs b/components/search/SearchRow.bs similarity index 92% rename from components/search/SearchRow.brs rename to components/search/SearchRow.bs index 7083513b8..8c78a1f83 100644 --- a/components/search/SearchRow.brs +++ b/components/search/SearchRow.bs @@ -1,8 +1,8 @@ -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" +import "pkg:/source/api/Items.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/utils/deviceCapabilities.bs" sub init() m.top.itemComponentName = "ListPoster" diff --git a/components/search/SearchTask.brs b/components/search/SearchTask.brs deleted file mode 100644 index 2591b7d4d..000000000 --- a/components/search/SearchTask.brs +++ /dev/null @@ -1,15 +0,0 @@ -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.functionName = "search" -end sub - -sub search() - if m.top.query <> invalid and m.top.query <> "" - m.top.results = searchMedia(m.top.query) - end if -end sub diff --git a/components/search/SearchTask.bs b/components/search/SearchTask.bs new file mode 100644 index 000000000..935fd43e0 --- /dev/null +++ b/components/search/SearchTask.bs @@ -0,0 +1,15 @@ +import "pkg:/source/api/Items.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/utils/deviceCapabilities.bs" + +sub init() + m.top.functionName = "search" +end sub + +sub search() + if m.top.query <> invalid and m.top.query <> "" + m.top.results = searchMedia(m.top.query) + end if +end sub diff --git a/components/section/section.brs b/components/section/section.bs similarity index 98% rename from components/section/section.brs rename to components/section/section.bs index 336ceb649..3a14c4e0e 100644 --- a/components/section/section.brs +++ b/components/section/section.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.showFromBottomAnimation = m.top.findNode("showFromBottomAnimation") diff --git a/components/section/sectionScroller.brs b/components/section/sectionScroller.bs similarity index 97% rename from components/section/sectionScroller.brs rename to components/section/sectionScroller.bs index c8bd1103f..7644049f2 100644 --- a/components/section/sectionScroller.brs +++ b/components/section/sectionScroller.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.previouslyDisplayedSection = 0 diff --git a/components/settings/settings.brs b/components/settings/settings.bs similarity index 98% rename from components/settings/settings.brs rename to components/settings/settings.bs index c46d30c25..dec4b043c 100644 --- a/components/settings/settings.brs +++ b/components/settings/settings.bs @@ -1,8 +1,8 @@ -import "pkg:/source/utils/config.brs" -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/utils/misc.bs" import "pkg:/source/roku_modules/log/LogMixin.brs" ' post device profile -import "pkg:/source/utils/deviceCapabilities.brs" +import "pkg:/source/utils/deviceCapabilities.bs" sub init() m.log = log.Logger("Settings") diff --git a/components/tasks/PostTask.bs b/components/tasks/PostTask.bs index d09679666..ecceb83a0 100644 --- a/components/tasks/PostTask.bs +++ b/components/tasks/PostTask.bs @@ -1,5 +1,5 @@ -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/misc.brs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/misc.bs" sub init() m.top.functionName = "postItems" diff --git a/components/tvshows/TVEpisodeRow.brs b/components/tvshows/TVEpisodeRow.bs similarity index 100% rename from components/tvshows/TVEpisodeRow.brs rename to components/tvshows/TVEpisodeRow.bs diff --git a/components/tvshows/TVEpisodeRowWithOptions.brs b/components/tvshows/TVEpisodeRowWithOptions.bs similarity index 99% rename from components/tvshows/TVEpisodeRowWithOptions.brs rename to components/tvshows/TVEpisodeRowWithOptions.bs index e580c11ae..d982d82c7 100644 --- a/components/tvshows/TVEpisodeRowWithOptions.brs +++ b/components/tvshows/TVEpisodeRowWithOptions.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.rows = m.top.findNode("tvEpisodeRow") diff --git a/components/tvshows/TVEpisodes.brs b/components/tvshows/TVEpisodes.bs similarity index 96% rename from components/tvshows/TVEpisodes.brs rename to components/tvshows/TVEpisodes.bs index 45af36110..583e4d30b 100644 --- a/components/tvshows/TVEpisodes.brs +++ b/components/tvshows/TVEpisodes.bs @@ -1,7 +1,7 @@ -import "pkg:/source/api/Image.brs" -import "pkg:/source/api/baserequest.brs" -import "pkg:/source/utils/config.brs" -import "pkg:/source/utils/misc.brs" +import "pkg:/source/api/Image.bs" +import "pkg:/source/api/baserequest.bs" +import "pkg:/source/utils/config.bs" +import "pkg:/source/utils/misc.bs" import "pkg:/source/api/sdk.bs" sub init() diff --git a/components/tvshows/TVListDetails.brs b/components/tvshows/TVListDetails.bs similarity index 98% rename from components/tvshows/TVListDetails.brs rename to components/tvshows/TVListDetails.bs index 3b29b3bfd..55eadf366 100644 --- a/components/tvshows/TVListDetails.brs +++ b/components/tvshows/TVListDetails.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/config.bs" sub init() m.title = m.top.findNode("title") diff --git a/components/tvshows/TVListOptions.brs b/components/tvshows/TVListOptions.bs similarity index 99% rename from components/tvshows/TVListOptions.brs rename to components/tvshows/TVListOptions.bs index 7b146d8e9..5cf169db6 100644 --- a/components/tvshows/TVListOptions.brs +++ b/components/tvshows/TVListOptions.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() diff --git a/components/tvshows/TVSeasonRow.brs b/components/tvshows/TVSeasonRow.bs similarity index 100% rename from components/tvshows/TVSeasonRow.brs rename to components/tvshows/TVSeasonRow.bs diff --git a/components/tvshows/TVShowDescription.brs b/components/tvshows/TVShowDescription.bs similarity index 98% rename from components/tvshows/TVShowDescription.brs rename to components/tvshows/TVShowDescription.bs index 9e0b61647..7c7b49e3c 100644 --- a/components/tvshows/TVShowDescription.brs +++ b/components/tvshows/TVShowDescription.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() buttons = m.top.findNode("buttons") diff --git a/components/tvshows/TVShowDetails.brs b/components/tvshows/TVShowDetails.bs similarity index 99% rename from components/tvshows/TVShowDetails.brs rename to components/tvshows/TVShowDetails.bs index a8006df43..e55ec225e 100644 --- a/components/tvshows/TVShowDetails.brs +++ b/components/tvshows/TVShowDetails.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/config.bs" sub init() m.top.optionsAvailable = false diff --git a/components/video/PauseMenu.bs b/components/video/PauseMenu.bs index 40418ec4f..e7b88ecbf 100644 --- a/components/video/PauseMenu.bs +++ b/components/video/PauseMenu.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" sub init() m.videoControls = m.top.findNode("videoControls") diff --git a/components/video/VideoPlayerView.brs b/components/video/VideoPlayerView.bs similarity index 99% rename from components/video/VideoPlayerView.brs rename to components/video/VideoPlayerView.bs index ce1bdc10e..3314f479f 100644 --- a/components/video/VideoPlayerView.brs +++ b/components/video/VideoPlayerView.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/utils/config.bs" sub init() ' Hide the overhang on init to prevent showing 2 clocks diff --git a/source/Main.brs b/source/Main.bs similarity index 100% rename from source/Main.brs rename to source/Main.bs diff --git a/source/ShowScenes.brs b/source/ShowScenes.bs similarity index 100% rename from source/ShowScenes.brs rename to source/ShowScenes.bs diff --git a/source/VideoPlayer.brs b/source/VideoPlayer.bs similarity index 100% rename from source/VideoPlayer.brs rename to source/VideoPlayer.bs diff --git a/source/api/Image.brs b/source/api/Image.bs similarity index 100% rename from source/api/Image.brs rename to source/api/Image.bs diff --git a/source/api/Items.brs b/source/api/Items.bs similarity index 100% rename from source/api/Items.brs rename to source/api/Items.bs diff --git a/source/api/UserLibrary.brs b/source/api/UserLibrary.bs similarity index 100% rename from source/api/UserLibrary.brs rename to source/api/UserLibrary.bs diff --git a/source/api/baserequest.brs b/source/api/baserequest.bs similarity index 100% rename from source/api/baserequest.brs rename to source/api/baserequest.bs diff --git a/source/api/sdk.bs b/source/api/sdk.bs index 9cd713f91..c115b840f 100644 --- a/source/api/sdk.bs +++ b/source/api/sdk.bs @@ -1,4 +1,4 @@ -import "pkg:/source/api/baserequest.brs" +import "pkg:/source/api/baserequest.bs" namespace api namespace albums diff --git a/source/api/userauth.brs b/source/api/userauth.bs similarity index 99% rename from source/api/userauth.brs rename to source/api/userauth.bs index a49d156e2..413905257 100644 --- a/source/api/userauth.brs +++ b/source/api/userauth.bs @@ -1,6 +1,6 @@ ' needed for SignOut() and ServerInfo() import "pkg:/source/utils/session.bs" -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" function get_token(user as string, password as string) url = "Users/AuthenticateByName?format=json" diff --git a/source/migrations.bs b/source/migrations.bs index 23f854fc2..76a226abe 100644 --- a/source/migrations.bs +++ b/source/migrations.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/misc.brs" +import "pkg:/source/utils/misc.bs" ' Functions that update the registry based on the last run version and the currently running version diff --git a/source/utils/Subtitles.brs b/source/utils/Subtitles.bs similarity index 100% rename from source/utils/Subtitles.brs rename to source/utils/Subtitles.bs diff --git a/source/utils/config.brs b/source/utils/config.bs similarity index 100% rename from source/utils/config.brs rename to source/utils/config.bs diff --git a/source/utils/deviceCapabilities.brs b/source/utils/deviceCapabilities.bs similarity index 99% rename from source/utils/deviceCapabilities.brs rename to source/utils/deviceCapabilities.bs index ffd4026f9..80b0dcebe 100644 --- a/source/utils/deviceCapabilities.brs +++ b/source/utils/deviceCapabilities.bs @@ -1,5 +1,5 @@ -import "pkg:/source/utils/misc.brs" -import "pkg:/source/api/baserequest.brs" +import "pkg:/source/utils/misc.bs" +import "pkg:/source/api/baserequest.bs" ' Returns the Device Capabilities for Roku. ' Also prints out the device profile for debugging diff --git a/source/utils/globals.brs b/source/utils/globals.bs similarity index 100% rename from source/utils/globals.brs rename to source/utils/globals.bs diff --git a/source/utils/misc.brs b/source/utils/misc.bs similarity index 99% rename from source/utils/misc.brs rename to source/utils/misc.bs index 73feca33f..d2d81d31c 100644 --- a/source/utils/misc.brs +++ b/source/utils/misc.bs @@ -1,4 +1,4 @@ -import "pkg:/source/utils/config.brs" +import "pkg:/source/utils/config.bs" function isNodeEvent(msg, field as string) as boolean return type(msg) = "roSGNodeEvent" and msg.getField() = field diff --git a/source/utils/session.bs b/source/utils/session.bs index 92d20d8d4..1be2c0f10 100644 --- a/source/utils/session.bs +++ b/source/utils/session.bs @@ -1,6 +1,6 @@ ' these are needed for ServerInfo() inside session.server.Populate() -import "pkg:/source/api/userauth.brs" -import "pkg:/source/api/baserequest.brs" +import "pkg:/source/api/userauth.bs" +import "pkg:/source/api/baserequest.bs" import "pkg:/source/migrations.bs" namespace session