1
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 11s
Docker Build & Deploy / Deploy to Production (push) Successful in 3s

This commit is contained in:
孙诚
2025-04-03 12:03:40 +08:00
parent 8e3643faeb
commit cca7b5857e

View File

@@ -194,16 +194,17 @@ public class ChineseNfoRegistry : Registry, IChineseNfoRegistry
// 下载并覆盖海报
var posterPath = tvShowFile.Replace("tvshow.nfo", $"poster.{poster.Split('.').Last()}");
if (File.Exists(posterPath))
{
File.Delete(posterPath);
}
using var client = new HttpClient();
var response = await client.GetAsync(poster);
if (response.IsSuccessStatusCode)
{
var bytes = await response.Content.ReadAsByteArrayAsync();
if (File.Exists(posterPath))
{
File.Delete(posterPath);
}
await File.WriteAllBytesAsync(posterPath, bytes);
successCount++;
}