Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Ytdlp.NET/Ytdlp/Ytdlp.Execute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public async Task<ProcessResult> ExecuteRawAsync(string arguments,
CancellationToken ct = default,
bool tuneProcess = true)
{
ct.ThrowIfCancellationRequested();

if (string.IsNullOrWhiteSpace(arguments))
throw new ArgumentException("Arguments cannot be null or empty.", nameof(arguments));

Expand Down
2 changes: 2 additions & 0 deletions src/Ytdlp.NET/Ytdlp/Ytdlp.Probe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ public async Task<List<SubtitleTrack>> GetSubtitlesAsync(string url, Cancellatio
{
try
{
ct.ThrowIfCancellationRequested();

var result = await CreateRunner().ExecuteAsync(
arguments,
onLineReceived: null,
Expand Down
2 changes: 1 addition & 1 deletion tests/Ytdlp.NET.Test/ArgumentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ArgumentTests()
{
try
{
File.WriteAllText(_fullFakePath, "");
File.WriteAllText(_fullFakePath, "fake yt-dlp executable");
}
catch (IOException)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Ytdlp.NET.Test/AudioFormatTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public AudioFormatTests()
{
try
{
File.WriteAllText(_fullFakePath, "");
File.WriteAllText(_fullFakePath, "fake yt-dlp executable");
}
catch (IOException)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Ytdlp.NET.Test/YtdlpAdobeAuthTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public YtdlpAdobeAuthTests()
{
try
{
File.WriteAllText(_fullFakePath, "");
File.WriteAllText(_fullFakePath, "fake yt-dlp executable");
}
catch (IOException)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Ytdlp.NET.Test/YtdlpAuthTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public YtdlpAuthTests()
{
try
{
File.WriteAllText(_fullFakePath, "");
File.WriteAllText(_fullFakePath, "fake yt-dlp executable");
}
catch (IOException)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Ytdlp.NET.Test/YtdlpBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public YtdlpBuilderTests()
{
try
{
File.WriteAllText(_fullFakePath, "");
File.WriteAllText(_fullFakePath, "fake yt-dlp executable");
}
catch (IOException)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Ytdlp.NET.Test/YtdlpCancellationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public YtdlpCancellationTests()
{
try
{
File.WriteAllText(_fullFakePath, "");
File.WriteAllText(_fullFakePath, "fake yt-dlp executable");
}
catch (IOException)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Ytdlp.NET.Test/YtdlpEventTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public YtdlpEventTests()
{
try
{
File.WriteAllText(_fullFakePath, "");
File.WriteAllText(_fullFakePath, "fake yt-dlp executable");
}
catch (IOException)
{
Expand Down
Loading