Class SponsorBlockSegment
A SponsorBlock segment of the current track.
public sealed record SponsorBlockSegment : IEquatable<SponsorBlockSegment>
- Inheritance
-
SponsorBlockSegment
- Implements
- Inherited Members
Remarks
The server only refreshes segments on YouTube and YouTube Music tracks, so any other track can still report the previous ones.
Properties
ActionType
SponsorBlock action type of the segment, e.g. skip or mute.
[JsonPropertyName("actionType")]
[JsonInclude]
public string ActionType { get; init; }
Property Value
Remarks
The node only ever skips matched segments and never mutes them. Absorbs a null the server sends, readers see the empty string.
Category
SponsorBlock category, e.g. sponsor or selfpromo.
[JsonPropertyName("category")]
[JsonInclude]
public string Category { get; init; }
Property Value
Description
The description of the segment.
[JsonPropertyName("description")]
[JsonInclude]
public string Description { get; init; }
Property Value
End
Segment end, in milliseconds.
[JsonPropertyName("end")]
[JsonInclude]
[JsonConverter(typeof(RoundedInt64Converter))]
public long? End { get; init; }
Property Value
- long?
Remarks
Null when the server did not map one.
Locked
Whether the segment is locked in the SponsorBlock database.
[JsonPropertyName("locked")]
[JsonInclude]
[JsonConverter(typeof(TolerantBooleanConverter))]
public bool Locked { get; init; }
Property Value
Start
Segment start, in milliseconds.
[JsonPropertyName("start")]
[JsonInclude]
[JsonConverter(typeof(RoundedInt64Converter))]
public long? Start { get; init; }
Property Value
- long?
Remarks
Null when the server did not map one.
Uuid
The id of the segment.
[JsonPropertyName("uuid")]
[JsonInclude]
public string Uuid { get; init; }
Property Value
VideoDuration
Length of the video the segment was submitted for, in milliseconds.
[JsonPropertyName("videoDuration")]
[JsonInclude]
[JsonConverter(typeof(TolerantRoundedInt64Converter))]
public long VideoDuration { get; init; }
Property Value
Remarks
A null duration (a co-client that writes one) reads as zero, it is an informative counter, a failed read would cost the whole state or event.
Votes
The votes the segment has in the SponsorBlock database.
[JsonPropertyName("votes")]
[JsonInclude]
[JsonConverter(typeof(TolerantRoundedInt32Converter))]
public int Votes { get; init; }
Property Value
Remarks
A null vote count (a co-client that writes one) reads as zero, it is an informative counter, a failed read would cost the whole state or event.