Class SponsorBlockState
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
Categories
The categories the server skips, a null list reads as empty.
[JsonPropertyName("categories")]
[JsonInclude]
public IReadOnlyList<string> Categories { get; }
Property Value
Enabled
Whether the server skips segments.
[JsonPropertyName("enabled")]
[JsonInclude]
[JsonConverter(typeof(TolerantBooleanConverter))]
public bool Enabled { get; }
Property Value
LastSkippedUuid
The id of the segment that was skipped last.
[JsonPropertyName("lastSkippedUuid")]
[JsonInclude]
public string? LastSkippedUuid { get; }
Property Value
Segments
The segments loaded for the current track, a null list reads as empty.
[JsonPropertyName("segments")]
[JsonInclude]
public IReadOnlyList<SponsorBlockSegment> Segments { get; }
Property Value
SkipMarginMilliseconds
How long before a segment boundary the server skips, in milliseconds.
[JsonPropertyName("skipMarginMs")]
[JsonInclude]
[JsonConverter(typeof(TolerantRoundedInt32Converter))]
public int SkipMarginMilliseconds { get; }
Property Value
Methods
Equals(SponsorBlockState?)
Indicates whether the states carry the same members.
public bool Equals(SponsorBlockState? other)
Parameters
otherSponsorBlockStateThe 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.