Commit 29bafb7
committed
Fix duration and live stream detection in lockup extractor
- getDuration() returns -1 instead of throwing when no duration badge
is present (e.g. Shorts in related section)
- Add null guard before String.matches() to avoid NPE on missing badge text
- determineStreamType() now also checks thumbnailBottomOverlayViewModel
badges for the live style, so live streams in related videos are
correctly identified as LIVE_STREAM instead of VIDEO_STREAM
- Update Javadoc to reflect Shorts behaviour1 parent 8e6e0ed commit 29bafb7
1 file changed
Lines changed: 20 additions & 8 deletions
File tree
- extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors
Lines changed: 20 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
87 | | - | |
88 | | - | |
89 | | - | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | | - | |
93 | 94 | | |
94 | | - | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
106 | 118 | | |
107 | 119 | | |
108 | 120 | | |
| |||
0 commit comments