Skip to content

Commit

Permalink
Remove redundant comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Dec 12, 2024
1 parent 0abc2a4 commit 30ba3f2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions YoutubeExplode/Bridge/SearchResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ internal partial class SearchResponse(JsonElement content)
?.EnumerateDescendantProperties("lockupViewModel")
.Select(j => new PlaylistData(j))
.ToArray()
// fall back to older working paths
?? ContentRoot
?.EnumerateDescendantProperties("playlistRenderer")
.Select(j => new PlaylistData(j))
Expand Down Expand Up @@ -137,7 +136,6 @@ public class PlaylistData(JsonElement content)
[Lazy]
public string? Id =>
content.GetPropertyOrNull("contentId")?.GetStringOrNull()
// fall back to older working paths
?? content.GetPropertyOrNull("playlistId")?.GetStringOrNull();

[Lazy]
Expand All @@ -147,8 +145,10 @@ public class PlaylistData(JsonElement content)
[Lazy]
public string? Title =>
Metadata?.GetPropertyOrNull("title")?.GetPropertyOrNull("content")?.GetStringOrNull()
// fall back to older working paths
?? content.GetPropertyOrNull("title")?.GetPropertyOrNull("simpleText")?.GetStringOrNull()
?? content
.GetPropertyOrNull("title")
?.GetPropertyOrNull("simpleText")
?.GetStringOrNull()
?? content
.GetPropertyOrNull("title")
?.GetPropertyOrNull("runs")
Expand All @@ -165,7 +165,6 @@ public class PlaylistData(JsonElement content)
?.EnumerateArrayOrNull()
?.ElementAtOrNull(0)
?.GetPropertyOrNull("text")
// fall back to older working paths
?? content
.GetPropertyOrNull("longBylineText")
?.GetPropertyOrNull("runs")
Expand All @@ -175,7 +174,6 @@ public class PlaylistData(JsonElement content)
[Lazy]
public string? Author =>
AuthorDetails?.GetPropertyOrNull("content")?.GetStringOrNull()
// fall back to older working paths
?? AuthorDetails?.GetPropertyOrNull("text")?.GetStringOrNull();

[Lazy]
Expand All @@ -189,7 +187,6 @@ public class PlaylistData(JsonElement content)
?.GetPropertyOrNull("browseEndpoint")
?.GetPropertyOrNull("browseId")
?.GetStringOrNull()
// fall back to older working paths
?? AuthorDetails
?.GetPropertyOrNull("navigationEndpoint")
?.GetPropertyOrNull("browseEndpoint")
Expand All @@ -208,7 +205,6 @@ public class PlaylistData(JsonElement content)
?.EnumerateArrayOrEmpty()
.Select(j => new ThumbnailData(j))
.ToArray()
// fall back to older working paths
?? content
.GetPropertyOrNull("thumbnails")
?.EnumerateDescendantProperties("thumbnails")
Expand Down

0 comments on commit 30ba3f2

Please sign in to comment.