fallback avatar for channel
This commit is contained in:
parent
26da3088ba
commit
c9fba9cb1e
1 changed files with 6 additions and 1 deletions
|
@ -41,7 +41,12 @@ public class PeertubeChannelExtractor extends ChannelExtractor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getAvatarUrl() throws ParsingException {
|
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;
|
return ServiceList.PeerTube.getBaseUrl() + value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue