private void actuallyDownloadAWB(WebClient client, string source, string target)
{
try
{
TimeSpan t = DateTime.UtcNow - new DateTime(1970, 1, 1);
var unixTime = (int) t.TotalSeconds;
var url = string.Format(
"{0}?r={1}&ts={2}",
source,
HttpUtility.UrlEncode(
string.Format("https://sourceforge.net/projects/autowikibrowser/files/autowikibrowser/{0}/", source.Substring(source.LastIndexOf("/") + 1).Replace(".zip", ""))
),
unixTime
);
client.DownloadFile(url, target);
}
catch (WebException webEx)
{
UpdateUI(string.Format("Download of `{0}` failed: {1}", source, webEx.Message), true);
}
}