Members

(static, constant) PLAYBACK_INFO_ARROW

The source → target separator.

ONE constant because the glyph is a bet on the system font: U+2192 is in the Arrows block, which is further out than the U+2022 bullet the app already ships in JellyfinDataTransformer. It was checked on a real screen rather than assumed, and if it ever renders as .notdef on some device this is the single line to change to "->".

Default Value

Methods

(static) formatOneDecimal(value) → {string}

One decimal place, rounded, without Str()'s leading space.

BrightScript has no toFixed, and Str() on a float renders a platform-chosen number of digits — enough to turn "24.3" into "24.2999992". Doing the rounding in integer arithmetic is what keeps the output stable across devices.

Parameters:
NameTypeDescription
valuefloat

a non-negative number

Returns:
  • e.g. "24.3", "8.0"
Type: 
string

(static) getDisplayBitrate(bitrate) → {string}

Bitrate as the user reads it: one decimal of Mbps above a megabit, whole Kbps below. Matches Jellyfin's own web client, so the same stream reads the same in both places.

TRIMMED, and that is the whole point of the trim: BrightScript's Str() prefixes a SPACE for a non-negative number, so the untrimmed form rendered as "Bit Rate: 4 Mbps" once the row separator added its own space. Caught in an RTA capture rather than by any gate, hence the test beside it.

Parameters:
NameTypeDescription
bitratedynamic

bits per second, from the session or the media stream

Returns:
  • e.g. "25.4 Mbps", "850 Kbps", "" when there is no figure
Type: 
string

(static) getReadableSize(bytes) → {string}

A byte count as a human-readable size — binary units with one decimal ("24.3 GiB"), matching Jellyfin's own web client so a file reads identically in both. Binary rather than decimal units is that client's choice, not ours; the value is the one a user can cross-check against their server.

Coerced through decimalOrZero rather than mediaNumber, because a byte count passes 32 bits at ~2.1 GB and mediaNumber would overflow on any file worth reporting. The arithmetic stays in floating point for the same reason.

Parameters:
NameTypeDescription
bytesdynamic

MediaSourceInfo.Size, as the server sent it

Returns:
  • e.g. "24.2 GiB", "812.0 MiB", "" when there is no figure
Type: 
string

(static) pairedValue(source, target) → {string}

Compose one value cell as "source → target", or just the source when nothing changed.

The ABSENCE of an arrow is load-bearing: it is how the report says "this aspect passed through untouched", which is the question a viewer opening the report is usually asking. So a target that is empty, or identical to the source, must produce a bare source rather than an arrow pointing at a repeat of itself. Comparison is case-insensitive because the two sides come from different places — a source codec is "hevc" off the media stream and a target codec is "HEVC" off the session.

Parameters:
NameTypeDescription
sourcestring

the value as the file holds it, already display-formatted

targetstring

the value as the server is delivering it, or "" when unknown

Returns:
  • the composed cell, "" when there is nothing to show at all
Type: 
string