[CHANGE] Reworked parsers/converters. Decipher operation from script do not work!
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Manager.YouTube.Models.Innertube;
|
||||
|
||||
public class ColorInfo
|
||||
{
|
||||
[JsonPropertyName("primaries")]
|
||||
public string Primaries { get; set; } = "";
|
||||
[JsonPropertyName("transferCharacteristics")]
|
||||
public string TransferCharacteristics { get; set; } = "";
|
||||
[JsonPropertyName("matrixCoefficients")]
|
||||
public string MatrixCoefficients { get; set; } = "";
|
||||
}
|
||||
@@ -1,7 +1,11 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Manager.YouTube.Models.Innertube;
|
||||
|
||||
public class Range
|
||||
{
|
||||
[JsonPropertyName("start")]
|
||||
public uint Start { get; set; }
|
||||
[JsonPropertyName("end")]
|
||||
public uint End { get; set; }
|
||||
}
|
||||
@@ -1,10 +1,16 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Manager.YouTube.Models.Innertube;
|
||||
|
||||
public class StreamingData
|
||||
{
|
||||
public DateTime FetchedUtc { get; set; } = DateTime.UtcNow;
|
||||
[JsonPropertyName("expiresInSeconds")]
|
||||
public int ExpiresInSeconds { get; set; }
|
||||
[JsonPropertyName("serverAbrStreamingUrl")]
|
||||
public string ServerAbrStreamingUrl { get; set; } = "";
|
||||
[JsonPropertyName("formats")]
|
||||
public List<StreamingFormat> Formats { get; set; } = [];
|
||||
[JsonPropertyName("adaptiveFormats")]
|
||||
public List<StreamingFormat> AdaptiveFormats { get; set; } = [];
|
||||
}
|
||||
@@ -1,31 +1,59 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Manager.YouTube.Models.Innertube;
|
||||
|
||||
public class StreamingFormat
|
||||
{
|
||||
[JsonPropertyName("itag")]
|
||||
public int Itag { get; set; }
|
||||
[JsonPropertyName("url")]
|
||||
public string? Url { get; set; }
|
||||
[JsonPropertyName("mimeType")]
|
||||
public string MimeType { get; set; } = "";
|
||||
[JsonPropertyName("bitrate")]
|
||||
public uint Bitrate { get; set; }
|
||||
[JsonPropertyName("width")]
|
||||
public uint? Width { get; set; }
|
||||
[JsonPropertyName("height")]
|
||||
public uint? Height { get; set; }
|
||||
[JsonPropertyName("initRange")]
|
||||
public Range? InitRange { get; set; }
|
||||
[JsonPropertyName("indexRange")]
|
||||
public Range? IndexRange { get; set; }
|
||||
[JsonPropertyName("lastModified")]
|
||||
public long LastModified { get; set; }
|
||||
[JsonPropertyName("contentLength")]
|
||||
public long ContentLength { get; set; }
|
||||
[JsonPropertyName("quality")]
|
||||
public string Quality { get; set; } = "";
|
||||
[JsonPropertyName("xtags")]
|
||||
public string? Xtags { get; set; }
|
||||
[JsonPropertyName("fps")]
|
||||
public uint Fps { get; set; }
|
||||
[JsonPropertyName("qualityLabel")]
|
||||
public string QualityLabel { get; set; } = "";
|
||||
[JsonPropertyName("projectionType")]
|
||||
public string ProjectionType { get; set; } = "";
|
||||
[JsonPropertyName("averagebitrate")]
|
||||
public uint? AverageBitrate { get; set; }
|
||||
[JsonPropertyName("highReplication")]
|
||||
public bool? HighReplication { get; set; }
|
||||
[JsonPropertyName("colorInfo")]
|
||||
public ColorInfo? ColorInfo { get; set; }
|
||||
[JsonPropertyName("audioQuality")]
|
||||
public string? AudioQuality { get; set; } = "";
|
||||
[JsonPropertyName("approxDurationMs")]
|
||||
public long ApproxDurationMs { get; set; }
|
||||
[JsonPropertyName("audioSampleRate")]
|
||||
public int? AudioSampleRate { get; set; }
|
||||
[JsonPropertyName("audioChannels")]
|
||||
public int? AudioChannels { get; set; }
|
||||
[JsonPropertyName("loudnessDb")]
|
||||
public double? LoudnessDb { get; set; }
|
||||
[JsonPropertyName("isDrc")]
|
||||
public bool? IsDrc { get; set; }
|
||||
[JsonPropertyName("signatureCipher")]
|
||||
public string? SignatureCipher { get; set; }
|
||||
[JsonPropertyName("qualityOrdinal")]
|
||||
public string QualityOrdinal { get; set; } = "";
|
||||
}
|
||||
@@ -1,8 +1,13 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Manager.YouTube.Models.Innertube;
|
||||
|
||||
public class WebImage
|
||||
{
|
||||
[JsonPropertyName("width")]
|
||||
public int Width { get; set; }
|
||||
[JsonPropertyName("height")]
|
||||
public int Height { get; set; }
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; } = "";
|
||||
}
|
||||
@@ -4,6 +4,6 @@ namespace Manager.YouTube.Models.Parser;
|
||||
|
||||
public class YouTubeVideoData
|
||||
{
|
||||
public JsonObject? YouTubePlayerData { get; set; }
|
||||
public JsonObject? YouTubeInitialData { get; set; }
|
||||
public JsonNode? YouTubePlayerData { get; set; }
|
||||
public JsonNode? YouTubeInitialData { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user