mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-27 23:40:36 +05:30
Add requested changes.
This commit is contained in:
parent
4bd59f65f4
commit
ab49cb6e18
@ -61,6 +61,8 @@ public class YoutubeChannelExtractor extends ChannelExtractor {
|
||||
private JsonObject initialData;
|
||||
private JsonObject videoTab;
|
||||
|
||||
private static final long UNKNOWN_SUBSCRIBER_COUNT = -1;
|
||||
|
||||
/**
|
||||
* Some channels have response redirects and the only way to reliably get the id is by saving it.
|
||||
* <p>
|
||||
@ -281,7 +283,7 @@ public class YoutubeChannelExtractor extends ChannelExtractor {
|
||||
throw new ParsingException("Could not get subscriber count", e);
|
||||
}
|
||||
} else {
|
||||
return ITEM_COUNT_UNKNOWN;
|
||||
return UNKNOWN_SUBSCRIBER_COUNT;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,6 @@ import java.time.OffsetDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
import static org.schabi.newpipe.extractor.ListExtractor.ITEM_COUNT_UNKNOWN;
|
||||
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.*;
|
||||
import static org.schabi.newpipe.extractor.utils.Utils.EMPTY_STRING;
|
||||
import static org.schabi.newpipe.extractor.utils.Utils.UTF_8;
|
||||
@ -104,6 +103,8 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
||||
@Nullable
|
||||
private List<SubtitlesStream> subtitles = null;
|
||||
|
||||
private static final long UNKNOWN_SUBSCRIBER_COUNT = -1;
|
||||
|
||||
public YoutubeStreamExtractor(final StreamingService service, final LinkHandler linkHandler) {
|
||||
super(service, linkHandler);
|
||||
}
|
||||
@ -448,7 +449,7 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
||||
throw new ParsingException("Could not get uploader subscriber count", e);
|
||||
}
|
||||
} else {
|
||||
return ITEM_COUNT_UNKNOWN;
|
||||
return UNKNOWN_SUBSCRIBER_COUNT;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user