Skip to content

Commit

Permalink
[YouTube] Add a comment clarifying why the panelIdentfier can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiGr committed Feb 18, 2022
1 parent 5c8fbeb commit d337e53
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,8 @@ public List<StreamSegment> getStreamSegments() throws ParsingException {
final String panelIdentifier = panels.getObject(i)
.getObject("engagementPanelSectionListRenderer")
.getString("panelIdentifier");
// panelIdentifier might be null if the panel has something to do with ads
// See https://github.com/TeamNewPipe/NewPipe/issues/7792#issuecomment-1030900188
if ("engagement-panel-macro-markers-description-chapters".equals(panelIdentifier)) {
segmentsArray = panels.getObject(i)
.getObject("engagementPanelSectionListRenderer").getObject("content")
Expand Down

0 comments on commit d337e53

Please sign in to comment.