Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Sep 6, 2024
1 parent ffc887a commit 119e21f
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion YoutubeExplode.Converter/ConversionPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ public enum ConversionPreset
/// <summary>
/// Fastest conversion speed and biggest output file size.
/// </summary>
UltraFast = 3
UltraFast = 3,
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ public static TOut Pipe<TIn, TOut>(this TIn input, Func<TIn, TOut> transform) =>

public static T Clamp<T>(this T value, T min, T max)
where T : IComparable<T> =>
value.CompareTo(min) <= 0
? min
: value.CompareTo(max) >= 0
? max
: value;
value.CompareTo(min) <= 0 ? min
: value.CompareTo(max) >= 0 ? max
: value;
}
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ internal static class LanguageExtensions
"za" => "zha",
"zh" => "zho",
"zu" => "zul",
_ => null
_ => null,
};
}
}
2 changes: 1 addition & 1 deletion YoutubeExplode/Channels/ChannelClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public async ValueTask<Channel> GetAsync(
new Thumbnail(
"https://www.gstatic.com/youtube/img/tvfilm/clapperboard_profile.png",
new Resolution(1024, 1024)
)
),
]
);
}
Expand Down
2 changes: 1 addition & 1 deletion YoutubeExplode/Common/Thumbnail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal static IReadOnlyList<Thumbnail> GetDefaultSet(VideoId videoId) =>
new Thumbnail(
$"https://img.youtube.com/vi/{videoId}/hqdefault.jpg",
new Resolution(480, 360)
)
),
];
}

Expand Down
2 changes: 1 addition & 1 deletion YoutubeExplode/Search/SearchFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ public enum SearchFilter
/// <summary>
/// Only search for channels.
/// </summary>
Channel
Channel,
}
2 changes: 1 addition & 1 deletion YoutubeExplode/Utils/Extensions/HttpExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static HttpRequestMessage Clone(this HttpRequestMessage request)
// Don't dispose the original request's content
Content = request.Content is not null
? new NonDisposableHttpContent(request.Content)
: null
: null,
};

foreach (var (key, value) in request.Headers)
Expand Down
2 changes: 1 addition & 1 deletion YoutubeExplode/Utils/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static string SwapChars(this string str, int firstCharIndex, int secondCh
new StringBuilder(str)
{
[firstCharIndex] = str[secondCharIndex],
[secondCharIndex] = str[firstCharIndex]
[secondCharIndex] = str[firstCharIndex],
}.ToString();

public static int? ParseIntOrNull(this string str) =>
Expand Down
2 changes: 1 addition & 1 deletion YoutubeExplode/Videos/Streams/MediaStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public override long Seek(long offset, SeekOrigin origin) =>
SeekOrigin.Begin => offset,
SeekOrigin.Current => Position + offset,
SeekOrigin.End => Length + offset,
_ => throw new ArgumentOutOfRangeException(nameof(origin))
_ => throw new ArgumentOutOfRangeException(nameof(origin)),
};

[ExcludeFromCodeCoverage]
Expand Down
4 changes: 2 additions & 2 deletions YoutubeExplode/Videos/Streams/VideoQuality.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ internal Resolution GetDefaultVideoResolution() =>
2880 => new Resolution(5120, 2880),
3072 => new Resolution(4096, 3072),
4320 => new Resolution(7680, 4320),
_ => new Resolution(16 * MaxHeight / 9, MaxHeight)
_ => new Resolution(16 * MaxHeight / 9, MaxHeight),
};

/// <inheritdoc />
Expand Down Expand Up @@ -188,7 +188,7 @@ internal static VideoQuality FromItag(int itag, int framerate)
396 => 360,
395 => 240,
394 => 144,
_ => throw new ArgumentException($"Unrecognized itag '{itag}'.", nameof(itag))
_ => throw new ArgumentException($"Unrecognized itag '{itag}'.", nameof(itag)),
};

return new VideoQuality(maxHeight, framerate);
Expand Down
2 changes: 1 addition & 1 deletion YoutubeExplode/YoutubeHttpHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public YoutubeHttpHandler(
"CAISNQgDEitib3FfaWRlbnRpdHlmcm9udGVuZHVpc2VydmVyXzIwMjMwODI5LjA3X3AxGgJlbiACGgYIgLC_pwY"
)
{
Domain = "youtube.com"
Domain = "youtube.com",
}
);
}
Expand Down

0 comments on commit 119e21f

Please sign in to comment.