Skip to content

Commit

Permalink
修正 BV 号计算的 BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
nilaoda committed Aug 9, 2023
1 parent ede1047 commit 4761606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BBDown.Core/Util/BilibiliBvConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public static long Decode(string x)
public static string Encode(long x)
{
x = (x ^ xor) + add;
char[] r = "BV1 4 1 7 ".ToCharArray();
char[] r = "1 4 1 7 ".ToCharArray();
for (int i = 0; i < 6; i++)
{
r[s[i]] = table[(int)(x / (long)Math.Pow(58, i) % 58)];
}
return new string(r);
return "BV" + new string(r);
}

private static byte[] s = { 9, 8, 1, 6, 2, 4 };
Expand Down

0 comments on commit 4761606

Please sign in to comment.