Skip to content

Commit

Permalink
attempt to use wbi port to fix subtitle issue (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
imgradeone authored Jan 21, 2025
1 parent 600fe87 commit 4e6ee6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BBDown.Core/Util/SubUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public static (string, string) GetSubtitleCode(string key)
try
{
List<Subtitle> subtitles = new();
string api = $"https://api.bilibili.com/x/player/v2?cid={cid}&aid={aid}";
string api = $"https://api.bilibili.com/x/player/wbi/v2?cid={cid}&aid={aid}";
string json = await GetWebSourceAsync(api);
using var infoJson = JsonDocument.Parse(json);
var subs = infoJson.RootElement.GetProperty("data").GetProperty("subtitle").GetProperty("subtitles").EnumerateArray();
Expand Down
2 changes: 1 addition & 1 deletion BBDown/BBDownUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ public static async Task<List<ViewPoint>> FetchPointsAsync(string cid, string ai
var ponints = new List<ViewPoint>();
try
{
string api = $"https://api.bilibili.com/x/player/v2?cid={cid}&aid={aid}";
string api = $"https://api.bilibili.com/x/player/wbi/v2?cid={cid}&aid={aid}";
string json = await GetWebSourceAsync(api);
using var infoJson = JsonDocument.Parse(json);
if (infoJson.RootElement.GetProperty("data").TryGetProperty("view_points", out JsonElement vPoint))
Expand Down

0 comments on commit 4e6ee6a

Please sign in to comment.