Extract uploader's avatar in peertube.

Co-authored-by: Tobi <TobiGr@users.noreply.github.com>
This commit is contained in:
Kavin 2021-09-02 16:06:35 +05:30 committed by FireMasterK
parent a0c1dcc8d8
commit db6b3b2c29
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
1 changed files with 4 additions and 0 deletions

View File

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