Skip to content

Commit

Permalink
Fix a nullreference in the EndScreenItem ctor (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuylar authored Dec 28, 2023
1 parent 0a46c6b commit 2110223
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions InnerTube.Tests/PlayerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public void Setup()
[TestCase("jfKfPfyJRdk", true, false, Description = "Load a livestream")]
[TestCase("9gIXoaB-Jik", true, false, Description = "Video with WEBSITE endscreen item")]
[TestCase("4ZX9T0kWb4Y", true, false, Description = "Video with multiple audio tracks")]
[TestCase("-UBaW1OIgTo", true, false, Description = "EndScreenItem ctor")]
public async Task GetPlayer(string videoId, bool contentCheckOk, bool includeHls)
{
InnerTubePlayer player = await _innerTube.GetPlayerAsync(videoId, contentCheckOk, includeHls);
Expand Down
4 changes: 2 additions & 2 deletions InnerTube/InnerTube.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<PackageLicenseUrl>https://github.com/kuylar/InnerTube/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/kuylar/InnerTube</RepositoryUrl>
<PackageTags>youtube, innertube</PackageTags>
<AssemblyVersion>1.1.0</AssemblyVersion>
<Version>1.1.0</Version>
<AssemblyVersion>1.1.1</AssemblyVersion>
<Version>1.1.1</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- Remove/comment this while looking for missing XMLDocs -->
<NoWarn>$(NoWarn);1591</NoWarn>
Expand Down
2 changes: 1 addition & 1 deletion InnerTube/Models/EndScreenItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public EndScreenItem(JToken json)
{
Title = Utils.ReadText(json["title"]!.ToObject<JObject>()!);
Image = Utils.GetThumbnails(json.GetFromJsonPath<JArray>("image.thumbnails")!);
Metadata = Utils.ReadText(json["metadata"]!.ToObject<JObject>()!);
Metadata = Utils.ReadText(json["metadata"]?.ToObject<JObject>());
Style = json["style"]!.ToString();
StartMs = long.Parse(json["startMs"]!.ToString());
EndMs = long.Parse(json["endMs"]!.ToString());
Expand Down

0 comments on commit 2110223

Please sign in to comment.