Skip to content

Commit 33c0bea

Browse files
committed
Use already existing method
1 parent 49706fc commit 33c0bea

1 file changed

Lines changed: 3 additions & 16 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamInfoItemLockupExtractor.java

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -142,23 +142,10 @@ public List<Image> getUploaderAvatars() throws ParsingException {
142142
@Override
143143
public boolean isUploaderVerified() throws ParsingException {
144144
return metadataPart(0, 0)
145-
.stream()
146-
.flatMap(jsonObject -> jsonObject
147-
.getObject("text")
148-
.getArray("attachmentRuns")
149-
.streamAsJsonObjects())
150-
.flatMap(jsonObject -> jsonObject
151-
.getObject("element")
152-
.getObject("type")
153-
.getObject("imageType")
154-
.getObject("image")
155-
.getArray("sources")
156-
.streamAsJsonObjects())
157145
.map(jsonObject -> jsonObject
158-
.getObject("clientResource")
159-
.getString("imageName"))
160-
.map("CHECK_CIRCLE_FILLED"::equals)
161-
.findFirst()
146+
.getObject("text")
147+
.getArray("attachmentRuns"))
148+
.map(YoutubeParsingHelper::hasArtistOrVerifiedIconBadgeAttachment)
162149
.orElse(false);
163150
}
164151

0 commit comments

Comments
 (0)