Indetation formatting and unnecessary usings cleanup
This commit is contained in:
@@ -3,12 +3,12 @@ using YoutubeExplode.Models.ClosedCaptions;
|
||||
|
||||
namespace YouTube.Models
|
||||
{
|
||||
public class ClosedCaptionInfo
|
||||
{
|
||||
public CultureInfo Language { get; set; }
|
||||
public string Url { get; set; }
|
||||
public bool AutoGenerated { get; set; }
|
||||
public class ClosedCaptionInfo
|
||||
{
|
||||
public CultureInfo Language { get; set; }
|
||||
public string Url { get; set; }
|
||||
public bool AutoGenerated { get; set; }
|
||||
|
||||
internal ClosedCaptionTrackInfo TrackInfo { get; set; }
|
||||
}
|
||||
}
|
||||
internal ClosedCaptionTrackInfo TrackInfo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -4,16 +4,16 @@ using System.Text;
|
||||
|
||||
namespace YouTube.Models
|
||||
{
|
||||
public class ClosedCaptionTrack
|
||||
{
|
||||
public ClosedCaptionInfo Info { get; set; }
|
||||
public IReadOnlyList<ClosedCaption> Captions { get; set; }
|
||||
public class ClosedCaptionTrack
|
||||
{
|
||||
public ClosedCaptionInfo Info { get; set; }
|
||||
public IReadOnlyList<ClosedCaption> Captions { get; set; }
|
||||
|
||||
public class ClosedCaption
|
||||
{
|
||||
public TimeSpan Offset { get; set; }
|
||||
public TimeSpan Duration { get; set; }
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
public class ClosedCaption
|
||||
{
|
||||
public TimeSpan Offset { get; set; }
|
||||
public TimeSpan Duration { get; set; }
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,22 +4,22 @@ using System.Xml;
|
||||
|
||||
namespace YouTube.Models
|
||||
{
|
||||
public class DashManifest
|
||||
{
|
||||
public string Label { get; }
|
||||
public DateTime ValidUntil { get; }
|
||||
public DashManifest(string label, XmlDocument doc)
|
||||
{
|
||||
Label = label;
|
||||
Xml = doc;
|
||||
}
|
||||
public class DashManifest
|
||||
{
|
||||
public string Label { get; }
|
||||
public DateTime ValidUntil { get; }
|
||||
public DashManifest(string label, XmlDocument doc)
|
||||
{
|
||||
Label = label;
|
||||
Xml = doc;
|
||||
}
|
||||
|
||||
public string ManifestContent => Xml.OuterXml;
|
||||
public XmlDocument Xml { get; }
|
||||
public Uri WriteManifest(FileStream outStream)
|
||||
{
|
||||
Xml.Save(outStream);
|
||||
return new Uri(outStream.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
public string ManifestContent => Xml.OuterXml;
|
||||
public XmlDocument Xml { get; }
|
||||
public Uri WriteManifest(FileStream outStream)
|
||||
{
|
||||
Xml.Save(outStream);
|
||||
return new Uri(outStream.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,48 +1,46 @@
|
||||
using System.Drawing;
|
||||
|
||||
namespace YouTube.Models
|
||||
namespace YouTube.Models
|
||||
{
|
||||
public enum VideoFormat
|
||||
{
|
||||
/// <summary>
|
||||
/// MPEG-4 Part 2.
|
||||
/// </summary>
|
||||
Mp4V = 0,
|
||||
H263 = 1,
|
||||
/// <summary>
|
||||
/// MPEG-4 Part 10, H264, Advanced Video Coding (AVC).
|
||||
/// </summary>
|
||||
H264 = 2,
|
||||
Vp8 = 3,
|
||||
Vp9 = 4,
|
||||
Av1 = 5
|
||||
}
|
||||
public enum AudioFormat
|
||||
{
|
||||
/// <summary>
|
||||
/// MPEG-4 Part 3, Advanced Audio Coding (AAC).
|
||||
/// </summary>
|
||||
Aac = 0,
|
||||
Vorbis = 1,
|
||||
Opus = 2
|
||||
}
|
||||
public enum AudioQuality { Low, Medium, High }
|
||||
public enum VideoFormat
|
||||
{
|
||||
/// <summary>
|
||||
/// MPEG-4 Part 2.
|
||||
/// </summary>
|
||||
Mp4V = 0,
|
||||
H263 = 1,
|
||||
/// <summary>
|
||||
/// MPEG-4 Part 10, H264, Advanced Video Coding (AVC).
|
||||
/// </summary>
|
||||
H264 = 2,
|
||||
Vp8 = 3,
|
||||
Vp9 = 4,
|
||||
Av1 = 5
|
||||
}
|
||||
public enum AudioFormat
|
||||
{
|
||||
/// <summary>
|
||||
/// MPEG-4 Part 3, Advanced Audio Coding (AAC).
|
||||
/// </summary>
|
||||
Aac = 0,
|
||||
Vorbis = 1,
|
||||
Opus = 2
|
||||
}
|
||||
public enum AudioQuality { Low, Medium, High }
|
||||
|
||||
public class VideoPlaybackUrl
|
||||
{
|
||||
public string Quality { get; set; }
|
||||
public VideoFormat Format { get; set; }
|
||||
public string Url { get; set; }
|
||||
public Size Resolution { get; set; }
|
||||
public bool HasAudio { get; set; }
|
||||
public int Bitrate { get; set; }
|
||||
}
|
||||
|
||||
public class AudioPlaybackUrl
|
||||
{
|
||||
public AudioQuality Quality { get; set; }
|
||||
public AudioFormat Format { get; set; }
|
||||
public string Url { get; set; }
|
||||
public int Bitrate { get; set; }
|
||||
}
|
||||
}
|
||||
public class VideoPlaybackUrl
|
||||
{
|
||||
public string Quality { get; set; }
|
||||
public VideoFormat Format { get; set; }
|
||||
public string Url { get; set; }
|
||||
public System.Drawing.Size Resolution { get; set; }
|
||||
public bool HasAudio { get; set; }
|
||||
public int Bitrate { get; set; }
|
||||
}
|
||||
|
||||
public class AudioPlaybackUrl
|
||||
{
|
||||
public AudioQuality Quality { get; set; }
|
||||
public AudioFormat Format { get; set; }
|
||||
public string Url { get; set; }
|
||||
public int Bitrate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,18 +3,18 @@ using System.Collections.Generic;
|
||||
|
||||
namespace YouTube.Models
|
||||
{
|
||||
public class VideoPlayback
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public PlaybackUrlsData PlaybackUrls { get; set; } = new PlaybackUrlsData();
|
||||
public IReadOnlyList<ClosedCaptionInfo> ClosedCaptions { get; set; }
|
||||
public class VideoPlayback
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public PlaybackUrlsData PlaybackUrls { get; set; } = new PlaybackUrlsData();
|
||||
public IReadOnlyList<ClosedCaptionInfo> ClosedCaptions { get; set; }
|
||||
|
||||
public class PlaybackUrlsData
|
||||
{
|
||||
public IReadOnlyList<VideoPlaybackUrl> Video { get; set; }
|
||||
public IReadOnlyList<AudioPlaybackUrl> Audio { get; set; }
|
||||
public string LiveStreamUrl { get; set; }
|
||||
public DateTime ValidUntil { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
public class PlaybackUrlsData
|
||||
{
|
||||
public IReadOnlyList<VideoPlaybackUrl> Video { get; set; }
|
||||
public IReadOnlyList<AudioPlaybackUrl> Audio { get; set; }
|
||||
public string LiveStreamUrl { get; set; }
|
||||
public DateTime ValidUntil { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user