Browse Source

not all videos have audios

legacy v17.1
Austin Huang 4 years ago
parent
commit
8421b498bb
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 2
      app/src/main/java/awais/instagrabber/asyncs/i/iStoryStatusFetcher.java
  2. 2
      app/src/main/java/awais/instagrabber/utils/Utils.java

2
app/src/main/java/awais/instagrabber/asyncs/i/iStoryStatusFetcher.java

@ -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"),

2
app/src/main/java/awais/instagrabber/utils/Utils.java

@ -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…
Cancel
Save