-
-
Notifications
You must be signed in to change notification settings - Fork 553
Work around failure to fetch videos with multiple authors #911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Since our model doesn't support those kind of videos right now, we simply extract the first author in the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a workaround for handling YouTube videos that have multiple authors by extracting the first author when the primary author extraction method fails. The change ensures that video data can still be retrieved even when YouTube's API structure differs for multi-author videos.
Key changes:
- Added fallback logic for author ID extraction when videos have multiple authors
- Included explanatory comments about the limitation of the current data model
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ?? 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") |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skill issue tbh
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #911 +/- ##
=============================
=============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.