Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions YoutubeExplode/Bridge/PlaylistVideoData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,27 @@ internal class PlaylistVideoData(JsonElement content)
?.GetPropertyOrNull("navigationEndpoint")
?.GetPropertyOrNull("browseEndpoint")
?.GetPropertyOrNull("browseId")
?.GetStringOrNull()
// Some videos have multiple authors. Our current data model does not support that, so we only
// extract the first one, since it's the channel that actually uploaded the video.
?? AuthorDetails
?.GetPropertyOrNull("navigationEndpoint")
?.GetPropertyOrNull("showDialogCommand")
?.GetPropertyOrNull("panelLoadingStrategy")
?.GetPropertyOrNull("inlineContent")
?.GetPropertyOrNull("dialogViewModel")
?.GetPropertyOrNull("customContent")
?.GetPropertyOrNull("listViewModel")
?.GetPropertyOrNull("listItems")
?.EnumerateArrayOrNull()
?.FirstOrNull()
?.GetPropertyOrNull("listItemViewModel")
?.GetPropertyOrNull("rendererContext")
?.GetPropertyOrNull("commandContext")
?.GetPropertyOrNull("onTap")
?.GetPropertyOrNull("innertubeCommand")
?.GetPropertyOrNull("browseEndpoint")
?.GetPropertyOrNull("browseId")
Comment on lines +59 to +76
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This deeply nested property chain is difficult to maintain and understand. Consider extracting this logic into a separate helper method with meaningful intermediate variable names to improve readability and debuggability.

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skill issue tbh

?.GetStringOrNull();

[Lazy]
Expand Down