From ae283314dabbbd742a289e81519e7d6d1d05baaa Mon Sep 17 00:00:00 2001 From: TiA4f8R <74829229+TiA4f8R@users.noreply.github.com> Date: Thu, 25 Mar 2021 17:54:46 +0100 Subject: [PATCH] Add a comment explaining subscribers count calculation --- .../services/peertube/extractors/PeertubeAccountExtractor.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeAccountExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeAccountExtractor.java index 73dda98c..c8d6258c 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeAccountExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeAccountExtractor.java @@ -59,6 +59,9 @@ public class PeertubeAccountExtractor extends ChannelExtractor { @Override public long getSubscriberCount() throws ParsingException { + // The subscriber count cannot be retrieved directly. It needs to be calculated. + // An accounts subscriber count is the number of the channel owner's subscriptions + // plus the sum of all sub channels subscriptions. long subscribersCount = json.getLong("followersCount"); String accountVideoChannelUrl = baseUrl + PeertubeChannelLinkHandlerFactory.API_ENDPOINT; if (getId().contains(ACCOUNTS)) {