-
-
Notifications
You must be signed in to change notification settings - Fork 570
Expand file tree
/
Copy pathConversionFormat.cs
More file actions
25 lines (21 loc) · 681 Bytes
/
ConversionFormat.cs
File metadata and controls
25 lines (21 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.Diagnostics.CodeAnalysis;
using YoutubeExplode.Videos.Streams;
namespace YoutubeExplode.Converter;
/// <summary>
/// Encapsulates conversion media format.
/// </summary>
[Obsolete("Use YoutubeExplode.Videos.Streams.Container instead"), ExcludeFromCodeCoverage]
public readonly struct ConversionFormat(string name)
{
/// <summary>
/// Format name.
/// </summary>
public string Name { get; } = name;
/// <summary>
/// Whether this format is a known audio-only format.
/// </summary>
public bool IsAudioOnly => new Container(Name).IsAudioOnly();
/// <inheritdoc />
public override string ToString() => Name;
}