Add a comment explaining subscribers count calculation

pull/575/head
TiA4f8R 2021-03-25 17:54:46 +01:00
rodzic abb790f465
commit ae283314da
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: E6D3E7F5949450DD
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -59,6 +59,9 @@ public class PeertubeAccountExtractor extends ChannelExtractor {
@Override @Override
public long getSubscriberCount() throws ParsingException { 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"); long subscribersCount = json.getLong("followersCount");
String accountVideoChannelUrl = baseUrl + PeertubeChannelLinkHandlerFactory.API_ENDPOINT; String accountVideoChannelUrl = baseUrl + PeertubeChannelLinkHandlerFactory.API_ENDPOINT;
if (getId().contains(ACCOUNTS)) { if (getId().contains(ACCOUNTS)) {