Table of Contents

Class GroupTrack

Namespace
Nyra.Entities
Assembly
Nyra.dll

The track a GroupUpdate makes every member play.

public sealed record GroupTrack : IEquatable<GroupTrack>
Inheritance
GroupTrack
Implements
Inherited Members

Remarks

Exactly one of Encoded or Identifier must be set, or neither, the all-null form is the stop, it stops every member, the same Stop instance.

Properties

AudioTrackId

Selects a dub or alternate audio track on sources that expose more than one.

[JsonPropertyName("audioTrackId")]
public string? AudioTrackId { get; init; }

Property Value

string

Encoded

The base64 encoded track, from Encoded.

[JsonPropertyName("encoded")]
public string? Encoded { get; init; }

Property Value

string

Remarks

Mutually exclusive with Identifier.

Identifier

The load identifier, such as a search.

[JsonPropertyName("identifier")]
public string? Identifier { get; init; }

Property Value

string

Remarks

Mutually exclusive with Encoded, prefer Encoded. NodeLink, the only server with groups today, never resolves identifiers in its loader, so Nyra rejects this up front with NotSupportedException. The per-player path gates identifiers as Lavalink-only for the same reason.

Language

Selects the audio language on sources that expose more than one, takes precedence over AudioTrackId.

[JsonPropertyName("language")]
public string? Language { get; init; }

Property Value

string

Stop

The stop form, no track, every member stops.

[JsonIgnore]
public static GroupTrack Stop { get; }

Property Value

GroupTrack

Remarks

Carries no other member.

UserData

Client data the server attaches to the track and echoes back.

[JsonPropertyName("userData")]
public JsonElement? UserData { get; init; }

Property Value

JsonElement?

Remarks

Must be a JSON object when set.

Methods

Equals(GroupTrack?)

Indicates whether both tracks select the same media with the same raw client data.

public bool Equals(GroupTrack? other)

Parameters

other GroupTrack

The track to compare with.

Returns

bool

Whether the members match, the raw client data compared by content.

GetHashCode()

Returns a hash of the track's comparable members.

public override int GetHashCode()

Returns

int

The hash code.