fallback avatar for channel

This commit is contained in:
Ritvik Saraf 2018-10-12 02:27:32 +05:30
parent 26da3088ba
commit c9fba9cb1e
1 changed files with 6 additions and 1 deletions

View File

@ -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;
}