public static void GetPic(BiliInterfaceInfo info) { string avnum = info.AVNUM; string file = Environment.CurrentDirectory + @"\pic\" + avnum + ".jpg"; if (File.Exists(file)) { Log.Info("封面已存在 - " + avnum); } else { if (info.pic != null) { string url = info.pic; Log.Info("正在获取封面 - " + info.AVNUM + " | " + url + " -> " + file); TSDownload tsd = new TSDownload(url, file); tsd.StartWithoutThread(); } } }
public static void GetFace(BiliInterfaceInfo info) { if (!string.IsNullOrEmpty(info.face)) { string filename = GetFaceFilename(info); string file = Environment.CurrentDirectory + @"\pic\" + filename; if (File.Exists(file)) { Log.Info("头像已存在 - " + filename); } else { Log.Info("正在获取头像 - " + info.AVNUM + " | " + info.face + " -> " + file); TSDownload tsd = new TSDownload(info.face, file); tsd.StartWithoutThread(); } } else { Log.Warn("没有头像地址,请重新获取 - " + info.AVNUM); } }