Skip to content

Commit

Permalink
Merge pull request #284 from Wolfteam/add-missing-param
Browse files Browse the repository at this point in the history
Added missing progress param
  • Loading branch information
tomaszzmuda authored Sep 3, 2020
2 parents 03e6ca3 + 4e792ac commit fe90175
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/Xabe.FFmpeg.Downloader/FFmpegDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@ public abstract class FFmpegDownloader
{
/// <summary>
/// Download latest FFmpeg version for current operating system to FFmpeg.ExecutablePath. If it is not set download to ".".
/// <param id="version">Determine which version of FFmpeg should be downloaded</param>
/// <param name="version">Determine which version of FFmpeg should be downloaded</param>
/// <param name="progress">Progress of download</param>
/// </summary>
public static async Task GetLatestVersion(FFmpegVersion version)
public static async Task GetLatestVersion(FFmpegVersion version, IProgress<float> progress = null)
{
await GetLatestVersion(version, null);
await GetLatestVersion(version, null, progress);
}

/// <summary>
/// Download latest FFmpeg version for current operating system to FFmpeg.ExecutablePath. If it is not set download to ".".
/// <param id="version">Determine which version of FFmpeg should be downloaded</param>
/// <param name="version">Determine which version of FFmpeg should be downloaded</param>
/// <param name="path">FFmpeg executables destination directory</param>
/// <param name="progress">Progress of download</param>
/// </summary>
public static async Task GetLatestVersion(FFmpegVersion version, string path)
public static async Task GetLatestVersion(FFmpegVersion version, string path, IProgress<float> progress = null)
{
IFFmpegDownloader downloader;
switch (version)
Expand All @@ -39,7 +42,7 @@ public static async Task GetLatestVersion(FFmpegVersion version, string path)
default:
throw new NotImplementedException();
}
await downloader.GetLatestVersion(path);
await downloader.GetLatestVersion(path, progress);
}
}
}

0 comments on commit fe90175

Please sign in to comment.