Skip to content

Commit fcc42b6

Browse files
committed
Fix channels not working when opened through comment
1 parent c50b655 commit fcc42b6

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/invidious/extractors/InvidiousCommentsExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private void collectStreamsFrom(
9292
entries.stream()
9393
.filter(JsonObject.class::isInstance)
9494
.map(JsonObject.class::cast)
95-
.map(commentObj -> new InvidiousCommentsInfoItemExtractor(commentObj, url))
95+
.map(commentObj -> new InvidiousCommentsInfoItemExtractor(commentObj, url, baseUrl))
9696
.forEach(collector::commit);
9797
}
9898

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/invidious/extractors/InvidiousCommentsInfoItemExtractor.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@
1111

1212
public class InvidiousCommentsInfoItemExtractor implements CommentsInfoItemExtractor {
1313

14-
private final String url;
1514
private final JsonObject json;
15+
private final String url;
16+
private final String baseUrl;
1617

17-
public InvidiousCommentsInfoItemExtractor(final JsonObject json, final String url) {
18+
public InvidiousCommentsInfoItemExtractor(
19+
final JsonObject json,
20+
final String url,
21+
final String baseUrl
22+
) {
1823
this.json = json;
1924
this.url = url;
25+
this.baseUrl = baseUrl;
2026
}
2127

2228
@Override
@@ -48,7 +54,7 @@ public String getCommentId() {
4854

4955
@Override
5056
public String getUploaderUrl() {
51-
return json.getString("authorUrl");
57+
return baseUrl + json.getString("authorUrl");
5258
}
5359

5460
@Override

0 commit comments

Comments
 (0)