aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-01-22 16:27:47 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-01-22 16:27:47 +0000
commitf17350cc1d7301858f7e3b6336682a509ccf9691 (patch)
tree02b2d376a2433f98522be9b0deced7c4d27c262f /app
parenta7ab7e514eca77c4bc36df8a22b9c491f299d71c (diff)
downloadinfinity-for-reddit-f17350cc1d7301858f7e3b6336682a509ccf9691.tar
infinity-for-reddit-f17350cc1d7301858f7e3b6336682a509ccf9691.tar.gz
infinity-for-reddit-f17350cc1d7301858f7e3b6336682a509ccf9691.tar.bz2
infinity-for-reddit-f17350cc1d7301858f7e3b6336682a509ccf9691.tar.lz
infinity-for-reddit-f17350cc1d7301858f7e3b6336682a509ccf9691.tar.xz
infinity-for-reddit-f17350cc1d7301858f7e3b6336682a509ccf9691.tar.zst
infinity-for-reddit-f17350cc1d7301858f7e3b6336682a509ccf9691.zip
Fix a JSON key naming issue.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/FetchGfycatOrRedgifsVideoLinks.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/utils/JSONUtils.java4
2 files changed, 3 insertions, 5 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchGfycatOrRedgifsVideoLinks.java b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchGfycatOrRedgifsVideoLinks.java
index d6c0a470..a2a7d129 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/FetchGfycatOrRedgifsVideoLinks.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/FetchGfycatOrRedgifsVideoLinks.java
@@ -101,9 +101,9 @@ public class FetchGfycatOrRedgifsVideoLinks {
try {
JSONObject jsonObject = new JSONObject(response);
webm = jsonObject.getJSONObject(JSONUtils.GFY_ITEM_KEY)
- .getJSONObject(JSONUtils.GFY_CONTENT_KEY)
+ .getJSONObject(JSONUtils.CONTENT_URLS_KEY)
.getJSONObject(JSONUtils.WEBM_KEY)
- .getString(JSONUtils.GFY_URL_KEY);
+ .getString(JSONUtils.URL_KEY);
mp4 = jsonObject.getJSONObject(JSONUtils.GFY_ITEM_KEY).getString(JSONUtils.MP4_URL_KEY);
} catch (JSONException e) {
e.printStackTrace();
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/JSONUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/JSONUtils.java
index fe3d064c..989df80f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/JSONUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/JSONUtils.java
@@ -109,7 +109,6 @@ public class JSONUtils {
public static final String RESIZED_ICONS_KEY = "resized_icons";
public static final String GFY_ITEM_KEY = "gfyItem";
public static final String MP4_URL_KEY = "mp4Url";
- public static final String WEBM_URL_KEY = "webmUrl";
public static final String TYPE_KEY = "type";
public static final String MP4_KEY = "mp4";
public static final String THINGS_KEY = "things";
@@ -130,7 +129,6 @@ public class JSONUtils {
public static final String TOTAL_KARMA_KEY = "total_karma";
public static final String AWARDER_KARMA_KEY = "awarder_karma";
public static final String AWARDEE_KARMA_KEY = "awardee_karma";
- public static final String GFY_CONTENT_KEY = "content_urls";
- public static final String GFY_URL_KEY = "url";
+ public static final String CONTENT_URLS_KEY = "content_urls";;
public static final String WEBM_KEY = "webm";
}