Skip to content

Commit

Permalink
add error catching for infobox #145
Browse files Browse the repository at this point in the history
  • Loading branch information
kookxiang committed Jul 28, 2024
1 parent c39bb26 commit 5147c02
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Jellyfin.Plugin.Bangumi/Model/InfoBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ public class InfoBox : List<InfoBoxItem>
{
public string? GetString(string key)
{
return this.FirstOrDefault(x => x.Key == key)?.Value.GetString();
try
{
return this.FirstOrDefault(x => x.Key == key)?.Value.GetString();
}
catch
{
return null;
}
}
}

Expand Down

0 comments on commit 5147c02

Please sign in to comment.