Methods
(static) formatAudioChannels(channels) → {string}
formatAudioChannels: Convert channel count integer to display format Ignores ChannelLayout field since it can return inconsistent strings (e.g., "stereo")
| Name | Type | Description |
|---|---|---|
channels | integer | Number of audio channels |
- Channel layout string (e.g., "2.0", "5.1", "7.1") or "" if invalid/zero
- Type:
- string
(static) formatAudioDisplayTitle(stream) → {string}
formatAudioDisplayTitle: Build a display title for an audio stream Format: "Language CODEC CHANNELS" or "Language CODEC CHANNELS (default)"
| Name | Type | Description |
|---|---|---|
stream | object | Audio MediaStream object from Jellyfin API |
- Formatted display title (e.g., "English AAC 2.0 (default)") or "N/A" if insufficient data
- Type:
- string
(static) formatSubtitleDisplayTitle(stream) → {string}
formatSubtitleDisplayTitle: Build a display title for a subtitle stream Format: "Language CODEC", "Language CODEC (forced)", or "Language CODEC (default)" Forced takes precedence over default if both are set.
| Name | Type | Description |
|---|---|---|
stream | object | Subtitle MediaStream object from Jellyfin API |
- Formatted display title (e.g., "English SUBRIP (forced)") or "N/A" if insufficient data
- Type:
- string
(static) formatVideoDisplayTitle(stream) → {string}
formatVideoDisplayTitle: Build a display title for a video stream Format: "RESOLUTION CODEC" or "RESOLUTION CODEC RANGETYPE" (when HDR)
| Name | Type | Description |
|---|---|---|
stream | object | Video MediaStream object from Jellyfin API |
- Formatted display title (e.g., "4K HEVC HDR10") or "N/A" if insufficient data
- Type:
- string
(static) formatVideoSourceTitle(mediaSource, hasMultipleSources) → {string}
formatVideoSourceTitle: Build a display title for a video source (MediaSource) Finds the first video stream and formats it via formatVideoDisplayTitle(). When multiple sources exist (i.e., multiple versions of the same video), prepends the source Name (e.g., "[B&W] 1080p H264").
| Name | Type | Description |
|---|---|---|
mediaSource | object | A MediaSource object from Jellyfin API (must have mediaStreams array) |
hasMultipleSources | boolean | True when item has more than one MediaSource version |
- Formatted display title (e.g., "[B&W] 1080p H264") or "N/A" if no video stream found
- Type:
- string
(static) getVideoResolutionLabel(width, height, isInterlaced) → {string}
getVideoResolutionLabel: Determine resolution label from video dimensions Resolution thresholds check width OR height (either can qualify) 4K never gets p/i suffix. All other resolutions get "p" or "i" based on interlacing.
| Name | Type | Description |
|---|---|---|
width | integer | Video width in pixels |
height | integer | Video height in pixels |
isInterlaced | boolean | Whether the video is interlaced |
- Resolution label (e.g., "4K", "1080p", "720i") or "" if below all thresholds
- Type:
- string
(static) resolveLanguageName(langCode) → {string}
resolveLanguageName: Convert a 3-letter ISO 639-2 language code to its full display name Uses getSubtitleLanguages() from languages.bs as the lookup table. Falls back to the raw code if not found in the lookup table.
| Name | Type | Description |
|---|---|---|
langCode | string | 3-letter ISO 639-2 language code (e.g., "eng", "spa") |
- Full language name (e.g., "English", "Spanish") or raw code if unknown
- Type:
- string