mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-29 00:10:35 +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
|
@Override
|
||||||
public void onFetchPage(final Downloader downloader) throws IOException, ExtractionException {
|
public void onFetchPage(@Nonnull Downloader downloader) throws IOException, ExtractionException {
|
||||||
final Response response = downloader.get(
|
String accountUrl = baseUrl + PeertubeChannelLinkHandlerFactory.API_ENDPOINT;
|
||||||
baseUrl + PeertubeChannelLinkHandlerFactory.API_ENDPOINT + getId());
|
if (getId().contains("accounts/")) {
|
||||||
|
accountUrl += getId();
|
||||||
|
} else {
|
||||||
|
accountUrl += "accounts/" + getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
final Response response = downloader.get(accountUrl);
|
||||||
if (response != null && response.responseBody() != null) {
|
if (response != null && response.responseBody() != null) {
|
||||||
setInitialData(response.responseBody());
|
setInitialData(response.responseBody());
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user