mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-28 16:00:33 +05:30
[PeerTube] Prepend "accounts/" to channel id for backward compatibility
This commit is contained in:
parent
492db83ccf
commit
d130fd79c3
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user