Change peertube video host

This commit is contained in:
stom79 2018-10-05 18:07:48 +02:00
parent ad950dfe5f
commit 02bddbe012
2 changed files with 3 additions and 3 deletions

View File

@ -559,7 +559,7 @@ public class API {
List<HowToVideo> howToVideos = new ArrayList<>();
try {
HttpsConnection httpsConnection = new HttpsConnection(context);
String response = httpsConnection.get("https://peertube.fr/api/v1/video-channels/bb32394a-a6d2-4f41-9b8e-ad9514a66009/videos", 60, null, null);
String response = httpsConnection.get("https://peertube.social/api/v1/video-channels/mastalab_channel/videos", 60, null, null);
JSONArray jsonArray = new JSONObject(response).getJSONArray("data");
howToVideos = parseHowTos(jsonArray);
} catch (HttpsConnection.HttpsConnectionException e) {

View File

@ -118,14 +118,14 @@ public class HowToVideosAdapter extends BaseAdapter implements OnListActionInter
next.setBounds(0,0,(int) (30 * scale + 0.5f),(int) (30 * scale + 0.5f));
holder.how_to_description.setCompoundDrawables(null, null, next, null);
Glide.with(holder.how_to_image.getContext())
.load("https://peertube.fr" + howToVideo.getThumbnailPath())
.load("https://peertube.social" + howToVideo.getThumbnailPath())
.into(holder.how_to_image);
holder.how_to_container.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(context, WebviewActivity.class);
Bundle b = new Bundle();
String finalUrl = "https://peertube.fr" + howToVideo.getEmbedPath();
String finalUrl = "https://peertube.social" + howToVideo.getEmbedPath();
b.putString("url", finalUrl);
b.putBoolean("peertubeLink", true);
Pattern link = Pattern.compile("(https?:\\/\\/[\\da-z\\.-]+\\.[a-z\\.]{2,10})\\/videos\\/embed\\/(\\w{8}-\\w{4}-\\w{4}-\\w{4}-\\w{12})$");