validate peertube instance. changed peertube color

This commit is contained in:
yausername 2019-11-23 00:31:35 +05:30
parent 81658de08f
commit ac2543d0a1
27 changed files with 26 additions and 32 deletions

View file

@ -11,6 +11,7 @@ import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.ServiceList;
import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.services.peertube.PeertubeInstance;
import java.util.concurrent.TimeUnit;
@ -140,7 +141,8 @@ public class ServiceHelper {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
String peerTubeInstanceUrl = sharedPreferences.getString(context.getString(R.string.peertube_instance_url_key), ServiceList.PeerTube.getBaseUrl());
String peerTubeInstanceName = sharedPreferences.getString(context.getString(R.string.peertube_instance_name_key), ServiceList.PeerTube.getServiceInfo().getName());
ServiceList.PeerTube.setInstance(peerTubeInstanceUrl, peerTubeInstanceName);
PeertubeInstance instance = new PeertubeInstance(peerTubeInstanceUrl, peerTubeInstanceName);
ServiceList.PeerTube.setInstance(instance);
}
}