From db6b3b2c29d1751f08fd0822b822380d631ba640 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Thu, 2 Sep 2021 16:06:35 +0530 Subject: [PATCH] Extract uploader's avatar in peertube. Co-authored-by: Tobi --- .../peertube/extractors/PeertubeStreamInfoItemExtractor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamInfoItemExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamInfoItemExtractor.java index c7e0c529..b9c7f4b1 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamInfoItemExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamInfoItemExtractor.java @@ -59,6 +59,10 @@ public class PeertubeStreamInfoItemExtractor implements StreamInfoItemExtractor @Nullable @Override public String getUploaderAvatarUrl() { + final JsonObject account = item.getObject("account"); + if (account.has("avatar") && !account.isNull("avatar")) { + return baseUrl + account.getObject("avatar").getString("path"); + } return null; }