mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fixed new mega links not being resolved
This commit is contained in:
parent
a5843e12fa
commit
514d2f70fc
@ -21,6 +21,7 @@ namespace Wabbajack.Common
|
||||
public static AbsolutePath ModListDownloadFolder => "downloaded_mod_lists".RelativeTo(AbsolutePath.EntryPoint);
|
||||
|
||||
public static string MegaPrefix = "https://mega.nz/#!";
|
||||
public static string MegaFilePrefix = "https://mega.nz/file/";
|
||||
|
||||
public static readonly HashSet<Extension> SupportedArchives = new[]{".zip", ".rar", ".7z", ".7zip", ".fomod", ".omod", ".exe", ".dat", ".gz", ".tar"}
|
||||
.Select(s => new Extension(s)).ToHashSet();
|
||||
|
@ -77,7 +77,7 @@ namespace Wabbajack.Lib.Downloaders
|
||||
|
||||
public AbstractDownloadState? GetDownloaderState(string url)
|
||||
{
|
||||
if (url != null && url.StartsWith(Consts.MegaPrefix))
|
||||
if (url != null && (url.StartsWith(Consts.MegaPrefix) || url.StartsWith(Consts.MegaFilePrefix)))
|
||||
return new State(url);
|
||||
return null;
|
||||
}
|
||||
@ -132,7 +132,7 @@ namespace Wabbajack.Lib.Downloaders
|
||||
try
|
||||
{
|
||||
var node = await MegaApiClient.GetNodeFromLinkAsync(fileLink);
|
||||
return true;
|
||||
return node != null;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user