Skip to content

Commit 812c8e0

Browse files
committed
authorName in comments now follow PeerTube website
https://peertube.cpy.re/videos/watch/d2a5ec78-5f85-4090-8ec5-dc1102e022ea anonyme zirbeldrüse is his displayName, what was displayed in NewPipe. but on the website, it's shown 777@mastodon.xyz
1 parent c790261 commit 812c8e0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeCommentsInfoItemExtractor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public String getCommentText() throws ParsingException {
6767
try {
6868
Document doc = Jsoup.parse(htmlText);
6969
return doc.body().text();
70-
}catch(Exception e) {
70+
} catch(Exception e) {
7171
return htmlText.replaceAll("(?s)<[^>]*>(\\s*<[^>]*>)*", "");
7272
}
7373
}
@@ -83,15 +83,15 @@ public String getAuthorThumbnail() throws ParsingException {
8383
String value;
8484
try {
8585
value = JsonUtils.getString(item, "account.avatar.path");
86-
}catch(Exception e) {
86+
} catch(Exception e) {
8787
value = "/client/assets/images/default-avatar.png";
8888
}
8989
return baseUrl + value;
9090
}
9191

9292
@Override
9393
public String getAuthorName() throws ParsingException {
94-
return JsonUtils.getString(item, "account.displayName");
94+
return JsonUtils.getString(item, "account.name") + "@" + JsonUtils.getString(item, "account.host");
9595
}
9696

9797
@Override

0 commit comments

Comments
 (0)