Skip to content

Commit

Permalink
修复多P仅封面出现空白后缀问题 Fix #752
Browse files Browse the repository at this point in the history
  • Loading branch information
nilaoda committed Oct 26, 2023
1 parent 346607c commit 77b75cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions BBDown/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,9 @@ public static async Task DownloadPageAsync(MyOption myOption, VInfo vInfo, Dicti

if (myOption.CoverOnly)
{
var newCoverPath = savePath[..savePath.LastIndexOf('.')] + Path.GetExtension(pic);
await DownloadFile((pic == "" ? p.cover! : pic), newCoverPath, downloadConfig);
var coverUrl = pic == "" ? p.cover! : pic;
var newCoverPath = savePath[..savePath.LastIndexOf('.')] + Path.GetExtension(coverUrl);
await DownloadFile(coverUrl, newCoverPath, downloadConfig);
if (Directory.Exists(p.aid) && Directory.GetFiles(p.aid).Length == 0) Directory.Delete(p.aid, true);
continue;
}
Expand Down

0 comments on commit 77b75cf

Please sign in to comment.