mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Add TES4RU support back in
This commit is contained in:
parent
b79830ad54
commit
aa591bafa7
@ -68,6 +68,16 @@ namespace Wabbajack.Lib.Downloaders
|
||||
IsAttachment = true
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
if (url.PathAndQuery.StartsWith("/files/download/") && long.TryParse(url.PathAndQuery.Split("/").Last(), out var fileId))
|
||||
{
|
||||
return new TState
|
||||
{
|
||||
FullURL = url.ToString(),
|
||||
IsAttachment = true
|
||||
};
|
||||
}
|
||||
|
||||
if (!url.PathAndQuery.StartsWith("/files/file/"))
|
||||
{
|
||||
@ -76,6 +86,7 @@ namespace Wabbajack.Lib.Downloaders
|
||||
absolute = false;
|
||||
}
|
||||
|
||||
|
||||
var id = HttpUtility.ParseQueryString(url.Query)["r"];
|
||||
var file = absolute
|
||||
? url.AbsolutePath.Split('/').Last(s => s != "")
|
||||
|
@ -407,13 +407,12 @@ namespace Wabbajack.Test
|
||||
Assert.Equal("Cheese for Everyone!", await filename.Path.ReadAllTextAsync());
|
||||
}
|
||||
|
||||
/* Site is down
|
||||
[Fact]
|
||||
public async Task TESAllDownloader()
|
||||
{
|
||||
await DownloadDispatcher.GetInstance<TESAllDownloader>().Prepare();
|
||||
const string ini = "[General]\n" +
|
||||
"directURL=https://tesall.ru/files/getdownload/594545-wabbajack-test-file/";
|
||||
"directURL=https://tesall.ru/files/download/594545";
|
||||
|
||||
var state = (AbstractDownloadState)await DownloadDispatcher.ResolveArchive(ini.LoadIniString());
|
||||
|
||||
@ -431,7 +430,6 @@ namespace Wabbajack.Test
|
||||
|
||||
Assert.Equal("Cheese for Everyone!", await filename.Path.ReadAllTextAsync());
|
||||
}
|
||||
*/
|
||||
|
||||
/* WAITING FOR APPROVAL BY MODERATOR
|
||||
[Fact]
|
||||
|
Loading…
Reference in New Issue
Block a user