mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 14:47:29 +00:00
not all videos have audios
This commit is contained in:
parent
fc1891fbbf
commit
8421b498bb
@ -62,7 +62,7 @@ public final class iStoryStatusFetcher extends AsyncTask<Void, Void, StoryModel[
|
||||
final StoryModel[] models = new StoryModel[mediaLen];
|
||||
for (int i = 0; i < mediaLen; ++i) {
|
||||
data = media.getJSONObject(i);
|
||||
final boolean isVideo = data.has("has_audio") && data.optBoolean("has_audio");
|
||||
final boolean isVideo = data.has("video_duration");
|
||||
|
||||
models[i] = new StoryModel(data.getString("pk"),
|
||||
data.getJSONObject("image_versions2").getJSONArray("candidates").getJSONObject(0).getString("url"),
|
||||
|
@ -1257,7 +1257,7 @@ public final class Utils {
|
||||
final StoryModel[] storyModels = new StoryModel[itemsLen];
|
||||
for (int j = 0; j < itemsLen; ++j) {
|
||||
final JSONObject data = items.getJSONObject(j);
|
||||
final boolean isVideo = data.has("has_audio") && data.optBoolean("has_audio");
|
||||
final boolean isVideo = data.has("video_duration");
|
||||
|
||||
storyModels[j] = new StoryModel(data.getString("pk"),
|
||||
data.getJSONObject("image_versions2").getJSONArray("candidates").getJSONObject(0).getString("url"),
|
||||
|
Loading…
Reference in New Issue
Block a user