mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
use Infrastructure.Http.Get to download plugins
This commit is contained in:
parent
ee0fc1ac47
commit
49b657b84e
2 changed files with 2 additions and 8 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Infrastructure.Http;
|
||||
using Flow.Launcher.Infrastructure.Logger;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Plugin.PluginsManager.Models;
|
||||
|
|
@ -44,7 +45,7 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_downloading_plugin"),
|
||||
Context.API.GetTranslation("plugin_pluginsmanager_please_wait"));
|
||||
|
||||
Utilities.Download(plugin.UrlDownload, filePath);
|
||||
Http.Download(plugin.UrlDownload, filePath);
|
||||
|
||||
Context.API.ShowMsg(Context.API.GetTranslation("plugin_pluginsmanager_downloading_plugin"),
|
||||
Context.API.GetTranslation("plugin_pluginsmanager_download_success"));
|
||||
|
|
|
|||
|
|
@ -57,12 +57,5 @@ namespace Flow.Launcher.Plugin.PluginsManager
|
|||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
internal static void Download(string downloadUrl, string toFilePath)
|
||||
{
|
||||
using var wc = new WebClient { Proxy = Http.WebProxy() };
|
||||
|
||||
wc.DownloadFile(downloadUrl, toFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue