Skip to content

Commit

Permalink
修复版权内容的判断
Browse files Browse the repository at this point in the history
  • Loading branch information
nilaoda committed Oct 15, 2021
1 parent 7016820 commit 0003db1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BBDown/BBDown.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<Version>1.4.5</Version>
<Version>1.4.6</Version>
<Description>BBDown是一个免费且便捷高效的哔哩哔哩下载/解析软件.</Description>
<PackageProjectUrl>https://github.com/nilaoda/BBDown</PackageProjectUrl>
<StartupObject></StartupObject>
Expand Down
2 changes: 1 addition & 1 deletion BBDown/BBDownUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public static async Task<string> FixAvidAsync(string avid)
json = await GetWebSourceAsync(api);
using var infoJson = JsonDocument.Parse(json);
var data = infoJson.RootElement.GetProperty("data");
if (data.GetProperty("redirect_url").ToString().Contains("bangumi"))
if (data.TryGetProperty("redirect_url", out _) && data.GetProperty("redirect_url").ToString().Contains("bangumi"))
{
var epId = Regex.Match(data.GetProperty("redirect_url").ToString(), "ep(\\d+)").Groups[1].Value;
return $"ep:{epId}";
Expand Down

0 comments on commit 0003db1

Please sign in to comment.