Methods
(static) AssocArrayEqual(Array1, Array2) → {boolean}
Parameters:| Name | Type | Description |
|---|
Array1 | object | |
Array2 | object | |
(static) addOrdinalSuffix(day) → {string}
Parameters:| Name | Type | Description |
|---|
day | integer | |
(static) arrayHasValue(arr, value) → {boolean}
Check if a specific value is inside of an array
Parameters:| Name | Type | Description |
|---|
arr | object | |
value | dynamic | |
(static) div_ceiling(a, b) → {integer}
Parameters:| Name | Type | Description |
|---|
a | integer | |
b | integer | |
(static) findNodeBySubtype(node, subtype) → {dynamic}
Parameters:| Name | Type | Description |
|---|
node | dynamic | |
subtype | dynamic | |
(static) findParentOfType(node, typeName) → {object}
Traverses up the node hierarchy to find a parent node of a specific type This is useful for finding the main component when handling button events
Parameters:| Name | Type | Description |
|---|
node | object | |
typeName | string | |
(static) findParentWithField(node, fieldName) → {object}
Traverses up the node hierarchy to find a parent node that has a specific field This is useful for finding the main component when handling button events
Parameters:| Name | Type | Description |
|---|
node | object | |
fieldName | string | |
convert iso date string to a human readable date string eg. "March 13th, 2014"
Parameters:| Name | Type | Description |
|---|
isoDateString | string | |
Format time as 12 or 24 hour format based on system clock setting NOTE: This is NOT used by app's clock, only for displaying time in dialogs
Parameters:| Name | Type | Description |
|---|
time | dynamic | |
Parameters:| Name | Type | Attributes | Default | Description |
|---|
msg | dynamic | | | |
subnode | string | <optional>
| "buttons" | |
(static) getFirstAudioStreamIndex(streams) → {integer}
Returns the Jellyfin index of the first audio stream in the streams array
Parameters:| Name | Type | Description |
|---|
streams | dynamic | Array of media streams from Jellyfin |
Returns:- Jellyfin index of first audio stream, or 0 if not found
- Type:
- integer
(static) getFirstVideoStream(mediaStreams) → {dynamic}
getFirstVideoStream: Finds the first video stream in MediaStreams array MediaStreams[0] is not always a video stream - it could be subtitle or audio
Parameters:| Name | Type | Description |
|---|
mediaStreams | array | Array of media streams from playback info |
Returns:First video stream object, or invalid if not found
- Type:
- dynamic
(static) getGlobalSplashScreenSetting() → {string}
getGlobalSplashScreenSetting: Gets the global splash screen setting from registry or default
Reads from global registry first. If not found (user never changed it), reads default from settings.json (single source of truth). Works before user login since global settings are device-wide.
Returns:- Global splash screen setting value ("enabled" or "disabled")
- Type:
- string
(static) getMinutes(ticks) → {integer}
Converts ticks to minutes
Parameters:| Name | Type | Description |
|---|
ticks | dynamic | |
(static) getMsgPicker(msg, subnodeopt) → {object}
Parameters:| Name | Type | Attributes | Default | Description |
|---|
msg | dynamic | | | |
subnode | string | <optional>
| "" | |
(static) getRokuAudioTrackPosition(jellyfinAudioIndex, audioStreamsArray) → {string}
Converts a Jellyfin audio stream index to a Roku 1-indexed track position
Parameters:| Name | Type | Description |
|---|
jellyfinAudioIndex | integer | The Jellyfin audio stream index to find |
audioStreamsArray | dynamic | Array of audio streams (must have .index field) |
Returns:- Roku track position as string (1-indexed), defaults to "1"
- Type:
- string
(static) get_dialog_result(dialog, port) → {dynamic}
Returns the item selected or -1 on backpress or other unhandled closure of dialog.
Parameters:| Name | Type | Description |
|---|
dialog | dynamic | |
port | dynamic | |
(static) inArray(haystack, needle) → {boolean}
Search string array for search value. Return if it's found
Parameters:| Name | Type | Description |
|---|
haystack | dynamic | |
needle | dynamic | |
(static) inferServerUrl(url) → {string}
take an incomplete url string and use it to make educated guesses about the complete url. then tests these guesses to see if it can find a jf server returns the url of the server it found, or an empty string
Parameters:| Name | Type | Description |
|---|
url | string | |
(static) isAllValid(input) → {boolean}
Returns whether or not all items in passed array are valid
Parameters:| Name | Type | Description |
|---|
input | object | |
(static) isChainValid(root, propertyPath) → {boolean}
isChainValid: Returns whether or not all the properties in the passed property chain are valid. Stops evaluating at first found false value
Parameters:| Name | Type | Description |
|---|
root | dynamic | high-level object to test property chain against |
propertyPath | string | chain of properties under root object to test |
Returns:indicating if all properties in chain are valid
- Type:
- boolean
(static) isJellyfinServer(systemInfo) → {boolean}
accepts the raw json string of /system/info/public and returns a boolean indicating if ProductName is "Jellyfin Server"
Parameters:| Name | Type | Description |
|---|
systemInfo | object | |
(static) isLocalhost(url) → {boolean}
Returns true if the string is a loopback, such as 'localhost' or '127.0.0.1'
Parameters:| Name | Type | Description |
|---|
url | string | |
(static) isNodeEvent(msg, field) → {boolean}
Parameters:| Name | Type | Description |
|---|
msg | dynamic | |
field | string | |
(static) isValid(input) → {boolean}
Returns whether or not passed value is valid
Parameters:| Name | Type | Description |
|---|
input | dynamic | |
(static) isValidAndNotEmpty(input) → {boolean}
Returns whether or not passed value is valid and not empty Accepts a string, or any countable type (arrays and lists)
Parameters:| Name | Type | Description |
|---|
input | dynamic | |
(static) lastFocusedChild(obj) → {object}
Parameters:| Name | Type | Description |
|---|
obj | object | |
(static) leftPad(base, fill, length) → {string}
Parameters:| Name | Type | Description |
|---|
base | string | |
fill | string | |
length | integer | |
(static) message_dialog(messageopt) → {dynamic}
Parameters:| Name | Type | Attributes | Default | Description |
|---|
message | string | <optional>
| "" | |
(static) option_dialog(options, messageopt, defaultSelectionopt) → {integer}
Parameters:| Name | Type | Attributes | Default | Description |
|---|
options | dynamic | | | |
message | dynamic | <optional>
| "" | |
defaultSelection | dynamic | <optional>
| 0 | |
(static) parseUrl(url) → {object}
Returns an array from a url = [ url, proto, host, port, subdir+params ] If port or subdir are not found, an empty string will be added to the array Proto must be declared or array will be empty
Parameters:| Name | Type | Description |
|---|
url | string | |
(static) resolveSplashScreen(globalSplashSetting, serverSplashEnabled) → {boolean}
resolveSplashScreen: Resolves whether to show the splash screen on User Select screen
Checks JellyRock global setting. If "disabled", never shows splash. Otherwise follows server branding configuration. Ensures a valid boolean is always returned.
Parameters:| Name | Type | Description |
|---|
globalSplashSetting | dynamic | JellyRock global splash screen setting ("enabled", "disabled", or invalid) |
serverSplashEnabled | dynamic | Server's splashscreenEnabled setting (boolean or invalid) |
Returns:- Resolved splash screen enabled state (guaranteed boolean)
- Type:
- boolean
(static) roundNumber(f) → {integer}
Rounds number to nearest integer
Parameters:| Name | Type | Description |
|---|
f | float | |
(static) secondsToTimestamp(totalSeconds, addLeadingMinuteZero) → {string}
Converts seconds to a human readable timestamp. Used for progress bar during playback eg. 3661 seconds = "01:01:01"
Parameters:| Name | Type | Description |
|---|
totalSeconds | integer | |
addLeadingMinuteZero | boolean | |
(static) setFieldTextValue(field, value) → {void}
Parameters:| Name | Type | Description |
|---|
field | dynamic | |
value | dynamic | |
(static) show_dialog(message, optionsopt, defaultSelectionopt) → {integer}
Parameters:| Name | Type | Attributes | Default | Description |
|---|
message | string | | | |
options | dynamic | <optional>
| [] | |
defaultSelection | dynamic | <optional>
| 0 | |
(static) shuffleArray(array) → {object}
Takes an array of data, shuffles the order, then returns the array uses the Fisher-Yates shuffling algorithm
Parameters:| Name | Type | Description |
|---|
array | object | |
(static) startLoadingSpinner(disableRemoteopt, loadingTextopt) → {void}
startLoadingSpinner: Start a loading spinner and attach it to the main JRScene. Displays an invisible ProgressDialog node by default to disable keypresses while loading.
Parameters:| Name | Type | Attributes | Default | Description |
|---|
disableRemote | boolean | <optional>
| true | |
loadingText | string | <optional>
| "" | |
(static) stopLoadingSpinner() → {void}
(static) ticksToHuman(ticks) → {string}
Parameters:| Name | Type | Description |
|---|
ticks | longinteger | |
(static) ticksToMinutes(ticks) → {longinteger}
Converts ticks to number of minutes eg. 3661 totalSeconds = 61
Parameters:| Name | Type | Description |
|---|
ticks | longinteger | |
Returns:- Type:
- longinteger
(static) toBoolean(value) → {dynamic}
convert value to boolean and return value
Parameters:| Name | Type | Description |
|---|
value | dynamic | |
(static) toString(input) → {string}
Parameters:| Name | Type | Description |
|---|
input | dynamic | |
(static) urlCandidates(input) → {dynamic}
this is the "educated guess" logic for inferServerUrl that generates a list of complete url's as candidates for the tests in inferServerUrl. takes an incomplete url as an arg and returns a list of extrapolated full urls.
Parameters:| Name | Type | Description |
|---|
input | string | |
(static) versionChecker(versionToCheck, minVersionAccepted) → {dynamic}
Returns whether or not a version number (e.g. 10.7.7) is greater or equal to some minimum version allowed (e.g. 10.8.0)
Parameters:| Name | Type | Description |
|---|
versionToCheck | string | |
minVersionAccepted | string | |