Added config to set the max concurrent downloads
This commit is contained in:
@@ -9,6 +9,8 @@ namespace PluginManager.Online;
|
||||
|
||||
public class PluginsManager
|
||||
{
|
||||
|
||||
#if DEBUG
|
||||
/// <summary>
|
||||
/// The Plugin Manager constructor
|
||||
/// </summary>
|
||||
@@ -20,13 +22,16 @@ public class PluginsManager
|
||||
VersionsLink = vlink;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// The default Plugin Manager constructor. It uses the default links.
|
||||
/// The Plugin Manager constructor. It uses the default links and the default branch.
|
||||
/// </summary>
|
||||
public PluginsManager()
|
||||
/// <param name="branch">The main branch from where the plugin manager gets its info</param>
|
||||
public PluginsManager(string? branch = "releases")
|
||||
{
|
||||
PluginsLink = "https://raw.githubusercontent.com/andreitdr/SethPlugins/releases/PluginsList";
|
||||
VersionsLink = "https://raw.githubusercontent.com/andreitdr/SethPlugins/releases/Versions";
|
||||
PluginsLink = $"https://raw.githubusercontent.com/andreitdr/SethPlugins/{branch}/PluginsList";
|
||||
VersionsLink = $"https://raw.githubusercontent.com/andreitdr/SethPlugins/{branch}/Versions";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -49,4 +49,14 @@ public static class ServerCom
|
||||
await DownloadFileAsync(URl, location, progress, null);
|
||||
}
|
||||
|
||||
public static Task CreateDownloadTask(string URl, string location)
|
||||
{
|
||||
return DownloadFileAsync(URl, location, null, null);
|
||||
}
|
||||
|
||||
public static Task CreateDownloadTask(string URl, string location, IProgress<float> progress)
|
||||
{
|
||||
return DownloadFileAsync(URl, location, progress, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user