Members
(static, constant) FOCUS_PADDING
Vertical gap between the bottom of the poster (= bottom of the RowList focus ring) and the first text label. Prevents the focus border from overlapping the title.
- Default Value
- 18
Methods
(static) applyPlayedPercentage(item) → {void}
Sets the poster's progress bar percentage based on item type. Programs use live broadcast elapsed time (wall-clock derived); everything else uses UserData.PlayedPercentage as flattened by the data transformer.
For Programs, also installs a reactive bridge observer on the content node's playedPercentage field. JRRowList's 60s tick rewrites that field, and this observer forwards the change to m.poster.playedPercentage — updating any currently-mounted VideoProgressBar without a cell re-render.
Observer teardown is split across two sites to cover every itemContent transition this cell can see: • renderItem() top — handles transitions into a new valid bind (recycle into a different content node) and re-renders triggered by size changes on the same item. Required so applyPlayedPercentage doesn't double- install observers on size-change re-renders. • onItemContentChanged() invalid path — handles transitions to invalid, which never reach renderItem() and would otherwise leak the observer. This function therefore only needs to install — not clear.
| Name | Type | Description |
|---|---|---|
item | object |
- Type:
- void
(static) arrangeIconAndBackdropText() → {void}
Centers the icon in the upper portion of the backdrop and positions the library name label below it.
- Type:
- void
(static) evaluateTextureState() → {void}
Central texture decision — called when renderTracking, textureManagerState, loadedRowRange, or focusedColumns changes.
State machine: "destroyed" → force unload everything (no guards) "init" → no-op (freeze state during layout changes) "hidden" → renderTracking decides (keep Roku-allocated cells, unload rest) "active" → managed rows (visible + buffer): our buffer logic decides, renderTracking ignored (it's unreliable during layout recalcs). Outside rows: renderTracking decides.
- Type:
- void
(static) forceUnloadTexture() → {void}
Force-unloads textures unconditionally — used only during onDestroy(). Ignores m.isTextureUnloaded and m.cachedPosterUri guards so every cell releases memory.
- Type:
- void
(static) getLibraryIconPath(collectionType) → {string}
Maps a Jellyfin library collection type to a local icon image path. Used to display a type-appropriate icon on library tile backdrops.
| Name | Type | Description |
|---|---|---|
collectionType | string | item.collectionType string (e.g., "music", "livetv") |
pkg:/ path to the icon image
- Type:
- string
(static) getMyColumnIndex() → {integer}
Returns this cell's column index (position within its row).
column index, or -1 if the cell's position cannot be determined
- Type:
- integer
(static) getMyRowIndex() → {integer}
Returns this cell's row index by finding its row node in the content root's children. Computed on demand rather than cached because row indices shift when rows are dynamically inserted or removed (e.g. HomeRows section loading).
row index, or -1 if the cell's position cannot be determined
- Type:
- integer
(static) getRowItemCount() → {integer}
Returns the number of items in this cell's row.
- Type:
- integer
(static) getRowPosition() → {string}
Returns this cell's position relative to the managed row ranges. or "outside" if not in any managed range
"visible" if in a visible row, "buffer" if in a vertical buffer row,
- Type:
- string
(static) getTextureManagerState() → {string}
Returns the current texture manager state from the content root.
"init", "active", "hidden", "destroyed", or "init" if unavailable
- Type:
- string
(static) hideLoadingSpinner() → {void}
Hides and stops the loading spinner if it exists.
- Type:
- void
(static) init() → {void}
- Type:
- void
(static) initBackdropText(slotWidth, posterHeight) → {void}
Lazy-creates the backdrop text label for library tiles on first use. Deferred allocation avoids creating the node for non-library rows.
| Name | Type | Description |
|---|---|---|
slotWidth | float | |
posterHeight | float |
- Type:
- void
(static) isInHorizontalBuffer() → {boolean}
Checks whether this cell is in the horizontal buffer zone for its row. The buffer keeps up to TEXTURE_BUFFER_THRESHOLD items loaded, split evenly around the visible items: (threshold - numVisible) / 2 on each side. Wrap-aware for fixedFocusWrap rows where items wrap around the end. Only applies to rows with > TEXTURE_BUFFER_THRESHOLD items.
- Type:
- boolean
(static) logTextureAction(action) → {void}
Returns a human-readable identifier for the current cell: "[RowTitle] ItemName" Used in texture management logs so you can tell which item changed without decoding URLs. Uses m.log to avoid string concat crashes from invalid/non-string field values.
| Name | Type | Description |
|---|---|---|
action | string |
- Type:
- void
(static) onFocusChanged() → {void}
Toggles scrolling vs static title on focus, and speaks the title via audio guide.
- Type:
- void
(static) onFocusedColumnsChanged() → {void}
Fires when the parent screen updates the per-row focused column (horizontal scroll).
- Type:
- void
(static) onIconLoadStatusChanged() → {void}
Shows the icon and repositions it with the backdrop text once the icon image loads. Hides the icon on failure so a stale image from a previous render does not persist.
- Type:
- void
(static) onItemContentChanged() → {void}
- Type:
- void
(static) onLoadedRowRangeChanged() → {void}
Fires when the parent screen updates the loaded row range (focus change).
- Type:
- void
(static) onPosterLoadStatusChanged() → {void}
Hides the placeholder (and any backdropText) once the real poster image loads. Shows the placeholder when the image is unavailable, still loading, or failed. On failure, sets placeholder.itemType so JRPlaceholder surfaces a type-appropriate glyph on the themed backdrop.
backdropText visibility is only toggled for library tiles — standard items must not inherit a stale label when this component instance is recycled from a library row.
- Type:
- void
(static) onProgramProgressChanged(msg) → {void}
Forwarded write from the bound Program content node to the live poster. Fires when JRRowList's tick rewrites the node's playedPercentage.
| Name | Type | Description |
|---|---|---|
msg | object |
- Type:
- void
(static) onRenderTrackingChanged() → {void}
Fires when the cell scrolls in/out of the visible area.
- Type:
- void
(static) onSizeChanged() → {void}
- Type:
- void
(static) onTextureManagerStateChanged() → {void}
Fires when textureManagerState changes (init → active, active → hidden, etc.)
- Type:
- void
(static) reloadTexture() → {void}
Restores poster/icon URIs from cache when the cell scrolls back on screen. The placeholder will show briefly while the real image reloads from Roku's HTTP cache. Also serves as a retry path for previously failed loads — if the cell currently shows the fallback placeholder glyph, this re-attempts the real load.
- Type:
- void
(static) renderItem() → {void}
- Type:
- void
(static) renderLibraryTile(item, slotWidth, posterHeight) → {void}
Renders a My Media library tile: themed backdrop + type icon + library name. The poster loads the library's Primary image; when it loads successfully the placeholder (and overlaid text) hide to reveal the image. Library tiles never set placeholder.itemType — the type-specific itemIcon (live_tv_white etc.) overlays the backdrop, so the JRPlaceholder glyph stays empty.
| Name | Type | Description |
|---|---|---|
item | object | |
slotWidth | float | |
posterHeight | float |
- Type:
- void
(static) renderStandardItem(item, slotWidth, posterHeight) → {void}
Renders a standard item: poster image with title/subtitle text below.
| Name | Type | Description |
|---|---|---|
item | object | |
slotWidth | float | |
posterHeight | float |
- Type:
- void
(static) setupTextureObserver() → {void}
One-time setup: observes loadedRowRange and focusedColumns on the RowList's content root. The content root is the grandparent of itemContent in the content tree: contentRoot → rowNode → itemNode (itemContent) Called from onItemContentChanged. Skips if already connected.
- Type:
- void
(static) shouldLoadTexture() → {boolean}
Determines whether this cell should load its texture during initial render. Used in renderStandardItem/renderLibraryTile to skip network requests for cells outside the buffer zone.
Determines whether this cell should load its poster during initial render. Mirrors evaluateTextureState logic: managed rows trust buffer logic, outside rows trust renderTracking.
- Type:
- boolean
(static) showLoadingSpinner(slotWidth, posterHeight) → {void}
Lazy-creates and shows a small centered spinner over the backdrop for Loading placeholders.
| Name | Type | Description |
|---|---|---|
slotWidth | float | |
posterHeight | float |
- Type:
- void
(static) showPlaceholder(itemType) → {void}
Shows a type-appropriate placeholder glyph on the themed backdrop. Delegated to JRPlaceholder, which owns the backdrop + glyph + themed-blendColor composition and the itemType → URI mapping (via getPlaceholderImagePath).
The poster URI is cleared to "" so a recycled cell's stale image (e.g., the previous cell's photo) doesn't render on top of the placeholder. JRPoster sits ON TOP of JRPlaceholder per the XML order, so a stale URI would cover the placeholder glyph entirely. m.cachedPosterUri retains the real URL so reloadTexture() can retry it when the cell scrolls back on screen.
| Name | Type | Description |
|---|---|---|
itemType | string | Jellyfin item type string (e.g., "Movie", "Person") |
- Type:
- void
(static) unloadTexture() → {void}
Clears poster/icon URIs to release texture memory when the cell is off-screen. Items with no real image (cachedPosterUri = "") are skipped — they already show a lightweight local placeholder that costs negligible texture memory.
- Type:
- void
(static) unobserveProgramProgress() → {void}
Tears down the bridge observer on the previously-bound Program content node. Called from two sites to cover every itemContent transition this cell sees: • Top of renderItem() — runs before tile/standard/loading branching so recycled cells never leak observers onto stale content nodes regardless of which render branch the new bind takes. Also covers size-change re- renders on the same item (without it, applyPlayedPercentage would stack duplicate observers on every size change). • Invalid path of onItemContentChanged() — covers transitions to invalid, which never reach renderItem(). Without this site, an observer installed on a Program node would leak when the cell unbinds.
- Type:
- void
(static) updateLayout(slotWidth, posterHeight) → {void}
Updates positions and sizes of all child nodes to match the current slot dimensions. Called at the start of every renderItem() before branching into tile/standard mode.
| Name | Type | Description |
|---|---|---|
slotWidth | float | |
posterHeight | float |
- Type:
- void