From c9fba9cb1e12a96266c6703c045a85a2f9c99ad9 Mon Sep 17 00:00:00 2001 From: Ritvik Saraf <13ritvik@gmail.com> Date: Fri, 12 Oct 2018 02:27:32 +0530 Subject: [PATCH] fallback avatar for channel --- .../peertube/extractors/PeertubeChannelExtractor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeChannelExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeChannelExtractor.java index efab4c63b..b356f8495 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeChannelExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeChannelExtractor.java @@ -41,7 +41,12 @@ public class PeertubeChannelExtractor extends ChannelExtractor { @Override public String getAvatarUrl() throws ParsingException { - String value = JsonUtils.getString(json, "avatar.path"); + String value; + try { + value = JsonUtils.getString(json, "avatar.path"); + }catch(Exception e) { + value = "/client/assets/images/default-avatar.png"; + } return ServiceList.PeerTube.getBaseUrl() + value; }