format dislikes from the json
This commit is contained in:
parent
b3c16f7db3
commit
4b1c47f1c1
|
@ -37,13 +37,14 @@ public class RYDRequester {
|
||||||
connection.setConnectTimeout(5 * 1000);
|
connection.setConnectTimeout(5 * 1000);
|
||||||
if (connection.getResponseCode() == 200) {
|
if (connection.getResponseCode() == 200) {
|
||||||
JSONObject json = getJSONObject(connection);
|
JSONObject json = getJSONObject(connection);
|
||||||
dislikeCount = json.getInt("dislikes");
|
int dislikes = json.getInt("dislikes");
|
||||||
|
dislikeCount = dislikes;
|
||||||
if (debug) {
|
if (debug) {
|
||||||
Log.d(TAG, "dislikes fetched - " + dislikeCount);
|
Log.d(TAG, "dislikes fetched - " + dislikeCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the dislikes
|
// Set the dislikes
|
||||||
new Handler(Looper.getMainLooper()).post(() -> ReturnYouTubeDislikes.trySetDislikes(ReturnYouTubeDislikes.formatDislikes(dislikeCount)));
|
new Handler(Looper.getMainLooper()).post(() -> ReturnYouTubeDislikes.trySetDislikes(ReturnYouTubeDislikes.formatDislikes(dislikes)));
|
||||||
}
|
}
|
||||||
else if (debug) {
|
else if (debug) {
|
||||||
Log.d(TAG, "dislikes fetch response was " + connection.getResponseCode());
|
Log.d(TAG, "dislikes fetch response was " + connection.getResponseCode());
|
||||||
|
|
Loading…
Reference in New Issue