Skip to content

Commit

Permalink
[Feat] pageNumberWithZero在小于10的时候仍需0,保证该参数符合0day命名
Browse files Browse the repository at this point in the history
  • Loading branch information
AdiEcho committed Oct 20, 2023
1 parent db116f1 commit 3c6533a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BBDown/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ private static string FormatSavePath(string savePathFormat, string title, Video?
{
"videoTitle" => GetValidFileName(title, filterSlash: true).Trim().TrimEnd('.').Trim(),
"pageNumber" => p.index.ToString(),
"pageNumberWithZero" => p.index.ToString().PadLeft((int)Math.Log10(pagesCount) + 1, '0'),
"pageNumberWithZero" => p.index.ToString().PadLeft((int)Math.Ceiling(Math.Log10(pagesCount)) + 1, '0'),
"pageTitle" => GetValidFileName(p.title, filterSlash: true).Trim().TrimEnd('.').Trim(),
"bvid" => p.bvid,
"aid" => p.aid,
Expand Down

0 comments on commit 3c6533a

Please sign in to comment.