diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamExtractor.java index 831bb10f5..6345e5acb 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/extractors/PeertubeStreamExtractor.java @@ -4,7 +4,6 @@ import com.grack.nanojson.JsonArray; import com.grack.nanojson.JsonObject; import com.grack.nanojson.JsonParser; import com.grack.nanojson.JsonParserException; - import org.schabi.newpipe.extractor.MediaFormat; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.StreamingService; @@ -30,6 +29,8 @@ import org.schabi.newpipe.extractor.stream.VideoStream; import org.schabi.newpipe.extractor.utils.JsonUtils; import org.schabi.newpipe.extractor.utils.Utils; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; @@ -38,9 +39,6 @@ import java.util.Collections; import java.util.List; import java.util.Locale; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - public class PeertubeStreamExtractor extends StreamExtractor { private final String baseUrl; private JsonObject json; @@ -269,7 +267,9 @@ public class PeertubeStreamExtractor extends StreamExtractor { final List tags = getTags(); final String apiUrl; if (tags.isEmpty()) { - apiUrl = getUploaderUrl() + "/videos?start=0&count=8"; + apiUrl = baseUrl + "/api/v1/accounts/" + JsonUtils.getString(json, "account.name") + + "@" + JsonUtils.getString(json, "account.host") + + "/videos?start=0&count=8"; } else { apiUrl = getRelatedStreamsUrl(tags); }