Table of Contents

Class SponsorBlockState

Namespace
Nyra.Entities
Assembly
Nyra.dll

SponsorBlock state of a player, as reported by the server.

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

Properties

ActionTypes

The action types the server fetches segments for, a matched segment is always skipped by seeking, a null list reads as empty.

[JsonPropertyName("actionTypes")]
[JsonInclude]
public IReadOnlyList<string> ActionTypes { get; }

Property Value

IReadOnlyList<string>

Categories

The categories the server skips, a null list reads as empty.

[JsonPropertyName("categories")]
[JsonInclude]
public IReadOnlyList<string> Categories { get; }

Property Value

IReadOnlyList<string>

Enabled

Whether the server skips segments.

[JsonPropertyName("enabled")]
[JsonInclude]
[JsonConverter(typeof(TolerantBooleanConverter))]
public bool Enabled { get; }

Property Value

bool

LastSkippedUuid

The id of the segment that was skipped last.

[JsonPropertyName("lastSkippedUuid")]
[JsonInclude]
public string? LastSkippedUuid { get; }

Property Value

string

Segments

The segments loaded for the current track, a null list reads as empty.

[JsonPropertyName("segments")]
[JsonInclude]
public IReadOnlyList<SponsorBlockSegment> Segments { get; }

Property Value

IReadOnlyList<SponsorBlockSegment>

SkipMarginMilliseconds

How long before a segment boundary the server skips, in milliseconds.

[JsonPropertyName("skipMarginMs")]
[JsonInclude]
[JsonConverter(typeof(TolerantRoundedInt32Converter))]
public int SkipMarginMilliseconds { get; }

Property Value

int

Methods

Equals(SponsorBlockState?)

Indicates whether the states carry the same members.

public bool Equals(SponsorBlockState? other)

Parameters

other SponsorBlockState

The state to compare with.

Returns

bool

Whether the members match, the lists compared by content.

GetHashCode()

Returns a hash of the state's comparable members.

public override int GetHashCode()

Returns

int

The hash code.