Skip to content

Commit 453356a

Browse files
committed
Wire bullet comments extractor into client
1 parent a02ae06 commit 453356a

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/util/ExtractorHelper.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.schabi.newpipe.extractor.MetaInfo;
4141
import org.schabi.newpipe.extractor.NewPipe;
4242
import org.schabi.newpipe.extractor.Page;
43+
import org.schabi.newpipe.extractor.bulletComments.BulletCommentsInfo;
4344
import org.schabi.newpipe.extractor.channel.ChannelInfo;
4445
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabInfo;
4546
import org.schabi.newpipe.extractor.kiosk.KioskInfo;
@@ -168,6 +169,15 @@ public static Single<KioskInfo> getKioskInfo(final int serviceId,
168169
Single.fromCallable(() -> KioskInfo.getInfo(NewPipe.getService(serviceId), url)));
169170
}
170171

172+
public static Single<BulletCommentsInfo> getBulletCommentsInfo(final int serviceId,
173+
final String url,
174+
final boolean forceLoad) {
175+
checkServiceId(serviceId);
176+
return checkCache(forceLoad, serviceId, url, InfoCache.Type.BULLET_COMMENTS,
177+
Single.fromCallable(() ->
178+
BulletCommentsInfo.getInfo(NewPipe.getService(serviceId), url)));
179+
}
180+
171181
public static Single<InfoItemsPage<StreamInfoItem>> getMoreKioskItems(final int serviceId,
172182
final String url,
173183
final Page nextPage) {

app/src/main/java/org/schabi/newpipe/util/InfoCache.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public enum Type {
5555
CHANNEL,
5656
CHANNEL_TAB,
5757
COMMENTS,
58+
BULLET_COMMENTS,
5859
PLAYLIST,
5960
KIOSK,
6061
}

0 commit comments

Comments
 (0)