Methods

(static) buildSectionPlan() → {object}

buildSectionPlan: Reads homeSection0-6 settings, returns ordered array of sections to display

Returns:

Array of { type: string, settingIndex: integer }

Type: 
object

(static) cleanupLatestMediaTasks() → {void}

cleanupLatestMediaTasks: Stop and unobserve any in-flight latest media tasks

Returns:
Type: 
void

(static) createSkeletonRow(sectionType) → {object}

createSkeletonRow: Creates a single empty HomeRow with correct title, sectionId, and cursorSize. Adds a single placeholder child node so the RowList renders the row.

Parameters:
NameTypeDescription
sectionTypestring

The section type from user settings

Returns:

HomeRow node, or invalid if section type is unsupported

Type: 
object

(static) createSkeletonRows() → {void}

createSkeletonRows: Creates empty HomeRow nodes for all planned sections except latestmedia. Each skeleton row gets a single placeholder child so the RowList renders the row label and a loading indicator at the correct slot size.

Returns:
Type: 
void

(static) findInsertIndexForSection(sectionId) → {integer}

findInsertIndexForSection: Determines the correct content index for a section that needs to be inserted. Uses the section plan ordering to maintain row order.

Parameters:
NameTypeDescription
sectionIdstring

The sectionId to insert

Returns:

Index where the row should be inserted

Type: 
integer

(static) findLatestMediaInsertIndex() → {integer}

findLatestMediaInsertIndex: Determines the correct content index for latestmedia rows based on the section plan ordering.

Returns:

Index where latestmedia rows should be inserted

Type: 
integer

(static) findRowBySectionId(sectionId) → {object}

findRowBySectionId: Find a row in content by its sectionId field

Parameters:
NameTypeDescription
sectionIdstring

The sectionId to search for

Returns:

{ row: node, index: integer } or invalid if not found

Type: 
object

(static) getItemAtIndices(indices) → {dynamic}

Gets an item from content at specified row and item indices Performs all necessary bounds checking and validation

Parameters:
NameTypeDescription
indicesroArray

[rowIndex, itemIndex]

Returns:

ContentNode if valid, invalid otherwise

Type: 
dynamic

(static) getRowConfigForSection(sectionId) → {object}

getRowConfigForSection: Returns title and slotSize for a sectionId. Used when inserting a row that was previously removed (no skeleton exists).

Parameters:
NameTypeDescription
sectionIdstring

The sectionId

Returns:

{ title: string, slotSize: array } or invalid if unknown

Type: 
object

(static) getSectionIdForType(sectionType) → {dynamic}

getSectionIdForType: Maps a section type string to its sectionId

Parameters:
NameTypeDescription
sectionTypestring

Section type from user settings

Returns:

sectionId, or invalid if type is unsupported

Type: 
dynamic

(static) init() → {void}

Returns:
Type: 
void

(static) insertLatestMediaSkeletons() → {void}

insertLatestMediaSkeletons: Creates skeleton rows for each non-excluded library and inserts them at the correct position in the content node.

Returns:
Type: 
void

(static) itemSelected() → {void}

Returns:
Type: 
void

(static) loadLibraries() → {void}

loadLibraries: Entry point called by Home.bs via callFunc. Builds ordered section plan, creates skeleton rows, then fires data tasks.

Returns:
Type: 
void

(static) onDestroy() → {void}

onDestroy: Full teardown releasing all resources before component removal Called by Home.bs onDestroy() before nulling the homeRows reference

Returns:
Type: 
void

(static) onItemFocused() → {void}

Observer for rowItemFocused field - delegates to updateBackdropForFocusedItem

Returns:
Type: 
void

(static) onKeyEvent(key, press) → {boolean}

Parameters:
NameTypeDescription
keystring
pressboolean
Returns:
Type: 
boolean

(static) onLibrariesLoaded() → {void}

onLibrariesLoaded: Handler when LoadLibrariesTask returns data. Populates the library row, creates latestmedia skeleton rows, then fires latest tasks.

Returns:
Type: 
void

(static) onProgramsExpired() → {void}

Fires when JRRowList's progress tick detects at least one expired Program or Recording. Re-runs LoadOnNowTask and/or LoadActiveRecordingsTask to pull fresh data. Loading guards debounce repeated expiry signals while a load is already in flight, and section plan checks avoid wasted requests when the user has disabled the relevant sections.

Returns:
Type: 
void

(static) onSectionPopulated() → {void}

onSectionPopulated: Called after each section is populated with data. Signals AppLaunchComplete after 2 sections have loaded.

Returns:
Type: 
void

(static) populateLibraryRow() → {void}

populateLibraryRow: Fills the library row with filtered library items. Uses populateRowFromData for consistent in-place update behavior.

Returns:
Type: 
void

(static) populateRowFromData(sectionId, itemData) → {void}

populateRowFromData: Unified row population logic used by all update callbacks. Updates the children of the existing row node in place to avoid RowList re-layout and focus disruption. Removes the row if data is empty. If the row doesn't exist but data is available (e.g., a previously empty section now has content on refresh), creates and inserts the row at the correct position.

Parameters:
NameTypeDescription
sectionIdstring

The sectionId of the target row

itemDatadynamic

Array of content nodes from the task, or invalid/empty

Returns:
Type: 
void

(static) removeRowAtIndex(index) → {void}

removeRowAtIndex: Removes a row at the given index and recalculates sizes

Parameters:
NameTypeDescription
indexinteger

Content child index to remove

Returns:
Type: 
void

(static) setRowItemSize() → {void}

setRowItemSize: Loops through all home sections and sets the correct item sizes, heights, and spacings per row. rowItemSize[i] = slot size [width, posterHeight] — determines focus ring dimensions (poster only, no text). rowHeights[i] = total row height: slot + 90px text area for standard rows; slot-only for library tiles. rowSpacings[i] = gap after each row before the next row label. Must be set for ALL rows because Roku ignores itemSpacing entirely once rowSpacings is assigned (even partially). Standard rows use 60px; My Media uses 78px to partially compensate for its absent text area.

Returns:
Type: 
void

(static) startLatestMediaLoads() → {void}

startLatestMediaLoads: Fires LoadItemsTask for each latestmedia library

Returns:
Type: 
void

(static) startParallelLoads() → {void}

startParallelLoads: Fires off data tasks for sections that don't need library data. Library-dependent sections (library row, latestmedia) are handled in onLibrariesLoaded.

Returns:
Type: 
void

(static) updateActiveRecordingsItems() → {void}

Returns:
Type: 
void

(static) updateBackdropForFocusedItem() → {void}

Update backdrop to match currently focused item Handles all validation and edge cases Used by: onItemFocused observer and row update functions after replaceChild

Returns:
Type: 
void

(static) updateContinueWatchingItems() → {void}

Returns:
Type: 
void

(static) updateHomeRows() → {void}

updateHomeRows: Refresh data for all rows without tearing down the UI. Keeps existing row nodes in place to avoid focus disruption. As fresh data arrives, populateRowFromData updates row children in place.

Returns:
Type: 
void

(static) updateLatestItems(msg) → {void}

updateLatestItems: Processes LoadItemsTask content for a latest-in-library row. Uses msg parameter because each library has its own dynamically created task.

Parameters:
NameTypeDescription
msgdynamic

roSGNodeEvent from the LoadItemsTask

Returns:
Type: 
void

(static) updateNextUpItems() → {void}

Returns:
Type: 
void

(static) updateOnNowItems() → {void}

Returns:
Type: 
void

(static) updateSize() → {void}

Returns:
Type: 
void