Methods

(static) AppearsOnList(id) → {dynamic}

Get list of albums an artist appears on as a contributing artist (not album artist). Uses ContributingArtistIds which Jellyfin defines as artists who appear on the album but are NOT tagged as the album artist — so this row is mutually exclusive with MusicAlbumList(). Sorted by year descending.

Parameters:
NameTypeDescription
idstring
Returns:
Type: 
dynamic

(static) ArtistOverview(name) → {dynamic}

Music Artist Data

Parameters:
NameTypeDescription
namestring
Returns:
Type: 
dynamic

(static) AudioItem(id) → {dynamic}

Get audio item metadata (raw, no transform)

Parameters:
NameTypeDescription
idstring
Returns:
Type: 
dynamic

(static) AudioStream(id) → {dynamic}

Parameters:
NameTypeDescription
idstring
Returns:
Type: 
dynamic

(static) BackdropImage(id) → {dynamic}

Parameters:
NameTypeDescription
idstring
Returns:
Type: 
dynamic

(static) GetIntroVideos(id) → {dynamic}

Get Intro Videos for an item

Parameters:
NameTypeDescription
idstring
Returns:
Type: 
dynamic

(static) GetItemLyrics(itemId) → {dynamic}

Get lyrics for an Audio item.

Parameters:
NameTypeDescription
itemIdstring

The Audio item ID

Returns:

LyricDto: { Metadata: {...}, Lyrics: [{Start: ticks, Text: string}] }, or invalid

Type: 
dynamic

(static) GetMediaSegments(id) → {dynamic}

GetMediaSegments: Fetches media segments for an item (Intro, Outro, Recap, etc.).

Only available on Jellyfin 10.10.0+ servers. Returns invalid for older servers.

Parameters:
NameTypeDescription
idstring

The item ID

Returns:
  • { Items: [MediaSegmentDto], TotalRecordCount } or invalid
Type: 
dynamic

(static) GetSongsByArtist(id, paramsopt) → {dynamic}

Get list of songs belonging to an artist

Parameters:
NameTypeAttributesDefaultDescription
idstring
paramsobject<optional>
{}
Returns:
Type: 
dynamic

(static) GetSongsByArtistBroad(id) → {dynamic}

Get all Audio tracks by an artist in any capacity (album artist OR contributing artist). Broader than GetSongsByArtist (which uses AlbumArtistIds). Used for the artist Songs row so songs on compilation albums or items with mismatched album-level tags still surface.

Parameters:
NameTypeDescription
idstring

MusicArtist item ID

Returns:
Type: 
dynamic

(static) ItemDetailsMetaData(id, forceRefreshopt) → {dynamic}

MetaData for an item detail screen — includes People, Genres, and Studios in addition to Chapters and Trickplay. Use this instead of ItemMetaData() when populating a detail view.

Parameters:
NameTypeAttributesDefaultDescription
idstring
forceRefreshboolean<optional>
false
Returns:
Type: 
dynamic

(static) ItemMetaData(id, fieldsopt, forceRefreshopt) → {dynamic}

MetaData about an item — returns a JellyfinBaseItem node.

Parameters:
NameTypeAttributesDefaultDescription
idstring
fieldsstring<optional>
"Chapters,Trickplay"

Comma-separated Jellyfin fields to request. Defaults to Chapters and Trickplay only.

forceRefreshboolean<optional>
false
Returns:
Type: 
dynamic

(static) ItemPostPlaybackInfo(id, mediaSourceIdopt, audioTrackIndexopt, subtitleTrackIndexopt, startTimeTicksopt, videoMetadataopt, bypassDoviPreservationopt, forceTranscodingopt) → {dynamic}

Parameters:
NameTypeAttributesDefaultDescription
idstring
mediaSourceIdstring<optional>
""
audioTrackIndexinteger<optional>
-1
subtitleTrackIndexinteger<optional>
SubtitleSelection.NONE
startTimeTickslonginteger<optional>
0&
videoMetadatadynamic<optional>
invalid
bypassDoviPreservationboolean<optional>
false
forceTranscodingboolean<optional>
false
Returns:
Type: 
dynamic

(static) MusicAlbumList(id) → {dynamic}

Get list of albums where this artist is the album artist (strict: AlbumArtistIds only). Sorted by year descending so the discography reads newest-first. Does NOT include albums the artist merely contributes to — see AppearsOnList().

Parameters:
NameTypeDescription
idstring
Returns:
Type: 
dynamic

(static) MusicSongList(id) → {dynamic}

Get Songs that are on an Album

Parameters:
NameTypeDescription
idstring
Returns:
Type: 
dynamic

(static) TVSeasons(id) → {dynamic}

Seasons for a TV Show

Parameters:
NameTypeDescription
idstring
Returns:
Type: 
dynamic

(static) applyLiveTvMinSegments(postData) → {void}

applyLiveTvMinSegments: For HLS transcodes that report no source duration (live channels), request ≥8 segments per Roku's recommendation. Gives ~48 s seekable DVR window.

Parameters:
NameTypeDescription
postDataobject
Returns:
Type: 
void

(static) applyMediaSourceToPostData(postData, mediaSourceId, forceTranscoding) → {void}

applyMediaSourceToPostData: Applies the media source ID or live TV retry flags to a postData object. Live TV is detected by an empty mediaSourceId. On the first attempt, direct play is not disabled so the server can evaluate compatibility (matching web client behaviour). On retry, forceTranscoding=true sets EnableDirectPlay=false so the server provides a transcode URL instead.

Parameters:
NameTypeDescription
postDataobject

The request body assoc array to modify

mediaSourceIdstring

Media source ID, or "" for live TV

forceTranscodingboolean

True when retrying with forced transcoding

Returns:
Type: 
void

(static) optimizeAudioCodecListForSource(deviceProfile, channelCount, preferredMultichannelCodecopt) → {void}

Tailors a video transcoding profile's AudioCodec list to the current source's channel count so the server (and downstream HLS variant selection) can't fall back to a less-desirable codec.

Multichannel source (>2ch): Strips ALL stereo-output codecs (aac, mp3, flac, alac, pcm, lpcm, wav, vorbis). Without this, Jellyfin's HLS muxer offers BOTH the surround codec AND a stereo fallback as separate variants in the master playlist, and Roku's HLS player has been observed (via in-house testing on physical hardware; no upstream tracking issue at time of writing) to pick the stereo variant — defeating the entire point of having surround passthrough hardware. Caller must already have verified the device has surround passthrough before invoking with channelCount > 2.

Stereo source (≤2ch): Strips surround passthrough codecs (eac3, ac3, dts) plus aac so transcoding falls through to mp3. Avoids handing the server a surround target codec for content that's only 2ch anyway. If filtering empties a previously non-empty list, falls back to "mp3" (the intended target).

Multichannel surround target (issue #573): For a >2ch source, the stripped list MUST lead with a server-encodeable surround codec. Two failure modes this prevents, both observed on Jellyfin 10.11 via PlaybackInfo probes:

  • Empty list: Jellyfin's StreamBuilder omits the audioCodec query param, the server's InferAudioCodec falls through to the container name ("m3u8"), ffmpeg gets -codec:a:0 m3u8 and exits 8. Happens when passthrough is detected only via codecs not in surroundPriority (truehd/dtshd-only) so no surround codec is in the list.
  • On-device-decode leak: a list like "truehd,opus" (truehd un-encodeable for a non-truehd source; opus on-device-decode only) resolves server-side to opus, silently abandoning the user's surround/passthrough intent for a decoded stereo-ish path. Fix: prepend the user's preferred multichannel codec (playbackPreferredMultichannelCodec), clamped to a reliably-encodeable HLS surround target — eac3 or ac3 (dts is excluded: the server emits no audio stream for a dts transcode target). This is a no-op for healthy profiles (their stripped list already leads with eac3/ac3) and only rescues the degenerate truehd/dtshd-only shape.
Parameters:
NameTypeAttributesDefaultDescription
deviceProfileobject
channelCountinteger
preferredMultichannelCodecstring<optional>
"eac3"
Returns:
Type: 
void

(static) resolveMultichannelSurroundTarget(preferredMultichannelCodec) → {string}

Resolve the surround transcode target for a multichannel source from the user's preferred multichannel codec setting (playbackPreferredMultichannelCodec). Clamped to the reliably- encodeable HLS surround targets: eac3 (default) and ac3. dts is intentionally excluded — the Jellyfin server emits no audio stream for a dts transcode target (verified on 10.11), so a dts fallback would itself re-trigger the issue #573 failure. Both eac3 and ac3 are valid HLS audio targets in every video transcoding container (ts and mp4), so no per-container clamp is needed.

Parameters:
NameTypeDescription
preferredMultichannelCodecstring
Returns:
Type: 
string

(static) searchMedia(query) → {object}

Render-thread wrapper: delegates search to SearchTask (task thread) and blocks until complete. Used by Main.bs SearchBox flow which shows a ProgressDialog while waiting.

Parameters:
NameTypeDescription
querystring
Returns:
Type: 
object

(static) supportsLyrics() → {boolean}

supportsLyrics: Checks if the connected Jellyfin server supports the Lyrics API.

The /Audio/{itemId}/Lyrics endpoint was introduced in Jellyfin 10.9.0. Servers below 10.9.0 do not have this endpoint and will return 404. Guarding the request mirrors supportsMediaSegments() (source/utils/mediaSegments.bs) and lets the endpoint-availability ledger record this as a validated version-guard.

Returns:
  • true if server supports lyrics
Type: 
boolean

(static) useTranscodeAudioStream(playbackInfo) → {dynamic}

Parameters:
NameTypeDescription
playbackInfodynamic
Returns:
Type: 
dynamic