public string GetPlatformBanner(Platform PlatformToLookup, string Downloadpath)
{
if (PlatformToLookup.BannerURL != null)
{
WebClient FanartDownloader = new WebClient();
try
{
FanartDownloader.DownloadFile(PlatformToLookup.BannerURL, Downloadpath + "\\" + PlatformToLookup.ID + "_" + PlatformToLookup.Name + ".jpg");
return Downloadpath + "\\" + PlatformToLookup.ID + "_" + PlatformToLookup.Name + ".jpg";
}
catch (Exception e)
{
LogInstance.WriteToFile(3, "Unable to download fanart from thegamesdb with the following URL " + PlatformToLookup.BannerURL, LogSource);
LogInstance.WriteToFile(3, "Error received was: " + e.Message, LogSource);
return null;
}
}
else
return null;
}