private string buildThumbUrl(CardInfo card) { var id = card._id; var md5 = card.md5.image; return buildImageUrl(id, md5, "http://aos.a4c.jp/paris/p/stat/a/{0}/s/card/{1}/{2}/{3}/{4}/{5}/thumb/10/{6}-thumb-10_{7}.png"); }
public bool DownloadUserAvatar(CardInfo card) { var dirname = "cache"; if (!Directory.Exists(dirname)) { Directory.CreateDirectory(dirname); } var md5 = card.md5.sd; var filename = String.Format("{0}-avatar.png", md5); var pathString = Path.Combine(dirname, filename); if (File.Exists(pathString)) { return true; } var url = buildSdUrl(card); return this.DownloadBinary(url, pathString); }
private string buildSdUrl(CardInfo card) { var id = card._id; var md5 = card.md5.sd; return buildImageUrl(id, md5, "http://aos.a4c.jp/paris/p/stat/a/{0}/s/animation/sd/chara/{1}/{2}/{3}/{4}/{5}/static_standby/3/{6}-static_standby-3_{7}.png"); }
public bool DownloadCardThumb(CardInfo card) { var url = buildThumbUrl(card); var dirname = "cache"; if (!Directory.Exists(dirname)) { Directory.CreateDirectory(dirname); } var md5 = card.md5.image; var filename = String.Format("{0}-thumb.png", md5); var pathString = Path.Combine(dirname, filename); if(File.Exists(pathString)) { return true; } return this.DownloadBinary(url, pathString); }