wabbajack/Wabbajack.Lib/Downloaders/DownloaderUtils.cs

16 lines
386 B
C#
Raw Normal View History

2019-10-24 01:22:11 +00:00
using System;
namespace Wabbajack.Lib.Downloaders
{
public static class DownloaderUtils
{
2020-04-10 01:29:53 +00:00
public static Uri? GetDirectURL(dynamic? meta)
2019-10-24 01:22:11 +00:00
{
var url = meta?.General?.directURL;
if (url == null) return null;
return Uri.TryCreate((string) url, UriKind.Absolute, out var result) ? result : null;
}
}
}