mirror of
https://github.com/TeamNewPipe/NewPipeExtractor
synced 2025-08-30 13:57:46 +00:00
[PeerTube] Prepend "accounts/" to channel id for backward compatibility
This commit is contained in:
@@ -126,9 +126,15 @@ public class PeertubeAccountExtractor extends ChannelExtractor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFetchPage(final Downloader downloader) throws IOException, ExtractionException {
|
||||
final Response response = downloader.get(
|
||||
baseUrl + PeertubeChannelLinkHandlerFactory.API_ENDPOINT + getId());
|
||||
public void onFetchPage(@Nonnull Downloader downloader) throws IOException, ExtractionException {
|
||||
String accountUrl = baseUrl + PeertubeChannelLinkHandlerFactory.API_ENDPOINT;
|
||||
if (getId().contains("accounts/")) {
|
||||
accountUrl += getId();
|
||||
} else {
|
||||
accountUrl += "accounts/" + getId();
|
||||
}
|
||||
|
||||
final Response response = downloader.get(accountUrl);
|
||||
if (response != null && response.responseBody() != null) {
|
||||
setInitialData(response.responseBody());
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user