nodeHelpers

Methods

(static) createQueueItem(sourceNode) → {object}

createQueueItem: Create a queue item AA from a source item.

The queue item is a thin AA containing only what VideoPlayerView and QueueManager need. LoadVideoContentTask re-fetches all metadata server-side via ItemMetaData(), so the queue item does NOT need to carry full data — eliminating the deep-copy perf problem.

Accepts either a JellyfinBaseItem node (typed camelCase fields) or a raw Jellyfin API response AA (PascalCase fields). BrightScript AA lookup is case-insensitive, so field access works identically for both — e.g. sourceNode.backdropImageTags finds BackdropImageTags on a raw API AA and backdropImageTags on a typed node.

Fields always present in the returned AA (guaranteed contract):

  • backdropImageTags: Array of backdrop image tags (empty array = no backdrop)
  • parentBackdropImageTags: Array of parent backdrop tags (empty array = none)
  • parentBackdropItemId: Parent item ID for parent backdrops (empty string = none)

Fields present only when non-empty / non-zero:

  • id: Item identifier (required for playback)
  • type: Media type (required for queue routing)
  • title: Display title
  • mediaSourceId: Media source hint
  • runTimeTicks: Runtime duration
  • seriesId: Series ID for episode navigation in resume dialog
  • seasonId: Season ID for episode navigation in resume dialog
  • playbackPositionTicks: Saved resume position

Callers set startingPoint and selectedAudioStreamIndex on the returned AA after creation.

Parameters:
NameTypeDescription
sourceNodeobject

JellyfinBaseItem node or raw Jellyfin API response AA

Returns:

Associative array with guaranteed field contract, or invalid if sourceNode is invalid

Type: 
object