Skip to content

Commit

Permalink
Skip if response is empty object.
Browse files Browse the repository at this point in the history
Add demo video url.
  • Loading branch information
ThinhVu committed Mar 20, 2022
1 parent 306be36 commit 17c9e09
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@

2. Open Instagram, select image, images post you want to download. Click share -> Yeeeet.


Note that: To ensure Yeeeet running correctly, the Proxy server MUST WORK!

Demo:
https://www.youtube.com/watch?v=eMb9us2hH3w
4 changes: 3 additions & 1 deletion app/src/main/java/com/sfbl/yeeeeet/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.koushikdutta.async.http.AsyncHttpResponse;
import com.koushikdutta.ion.Ion;
import com.sfbl.javaext.asyncAwait.Async;
import com.sfbl.javaext.utils.Strings;

import java.io.File;
import java.util.concurrent.ExecutionException;
Expand Down Expand Up @@ -98,12 +99,13 @@ private void handleSendText(Intent intent) {
}

private void parseContent(String content) {
if (null == content) {
if (null == content || Strings.eq(content, "{}")) {
runOnUiThread(() -> {
Toast
.makeText(this.getApplicationContext(), "Failed to load metadata!", Toast.LENGTH_LONG)
.show();
});
this.finishAndRemoveTask();
}

JsonObject obj = new Gson().fromJson(content, JsonObject.class);
Expand Down

0 comments on commit 17c9e09

Please sign in to comment.