diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeInstance.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeInstance.java index 2bedc07cf..967c387f0 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeInstance.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeInstance.java @@ -26,7 +26,7 @@ public class PeertubeInstance { setInstanceMetaData(response); } - private PeertubeInstance(String url , String name) { + public PeertubeInstance(String url , String name) { this.url = url; this.name = name; } diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeService.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeService.java index efd86c758..2fc571ef3 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeService.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/PeertubeService.java @@ -140,6 +140,15 @@ public class PeertubeService extends StreamingService { this.getServiceInfo().setName("PeerTube"); } } + + public void setInstance(String url, String name) throws IOException { + this.instance = new PeertubeInstance(url, name); + if(!StringUtil.isBlank(instance.getName())) { + this.getServiceInfo().setName(instance.getName()); + }else { + this.getServiceInfo().setName("PeerTube"); + } + } @Override public KioskList getKioskList() throws ExtractionException {