Extract uploader's avatar in peertube.
Co-authored-by: Tobi <TobiGr@users.noreply.github.com>
This commit is contained in:
parent
a0c1dcc8d8
commit
db6b3b2c29
1 changed files with 4 additions and 0 deletions
|
@ -59,6 +59,10 @@ public class PeertubeStreamInfoItemExtractor implements StreamInfoItemExtractor
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public String getUploaderAvatarUrl() {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue