[YouTube] Add a comment clarifying why the panelIdentfier can be null

This commit is contained in:
TobiGr 2022-02-18 20:22:28 +01:00 committed by Tobi
parent 5c8fbeb166
commit d337e537dc
1 changed files with 2 additions and 0 deletions

View File

@ -1272,6 +1272,8 @@ public class YoutubeStreamExtractor extends StreamExtractor {
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")