From 02bddbe012d403e60e6c6ffb46d16104a44558d4 Mon Sep 17 00:00:00 2001 From: stom79 Date: Fri, 5 Oct 2018 18:07:48 +0200 Subject: [PATCH] Change peertube video host --- app/src/main/java/fr/gouv/etalab/mastodon/client/API.java | 2 +- .../fr/gouv/etalab/mastodon/drawers/HowToVideosAdapter.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/client/API.java b/app/src/main/java/fr/gouv/etalab/mastodon/client/API.java index e450e19ee..d6f2bb6d0 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/client/API.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/client/API.java @@ -559,7 +559,7 @@ public class API { List 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) { diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/HowToVideosAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/HowToVideosAdapter.java index e5ce1df64..7d7f80f51 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/HowToVideosAdapter.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/HowToVideosAdapter.java @@ -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})$");