update peertube instance

This commit is contained in:
Ritvik Saraf 2018-12-29 21:58:43 +05:30
parent b2c6928459
commit a83342de0f
2 changed files with 10 additions and 1 deletions

View File

@ -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;
}

View File

@ -141,6 +141,15 @@ public class PeertubeService extends StreamingService {
}
}
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 {
KioskList.KioskExtractorFactory kioskFactory = new KioskList.KioskExtractorFactory() {