From 94d1f5a4ebaa9b5904ff4430b0cf70dcbf5c0f10 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 17 Jan 2020 06:44:43 +0100 Subject: [PATCH] fix queued download file_list response handling --- app | 2 +- src/main/java/io/lbry/browser/LbrynetService.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app b/app index 5df8b8c..df3a958 160000 --- a/app +++ b/app @@ -1 +1 @@ -Subproject commit 5df8b8c4aa2b13070a0f46d6ca27e6178398da28 +Subproject commit df3a9587c04a7730338d835b2ecad066855ca1af diff --git a/src/main/java/io/lbry/browser/LbrynetService.java b/src/main/java/io/lbry/browser/LbrynetService.java index e312662..33c0583 100644 --- a/src/main/java/io/lbry/browser/LbrynetService.java +++ b/src/main/java/io/lbry/browser/LbrynetService.java @@ -244,7 +244,7 @@ public class LbrynetService extends PythonService { if (!response.has("error")) { JSONObject result = response.getJSONObject("result"); if (result != null) { - JSONArray fileItems = response.optJSONArray("items"); + JSONArray fileItems = result.optJSONArray("items"); if (fileItems != null && fileItems.length() > 0) { // TODO: Create Java FileItem class JSONObject item = fileItems.getJSONObject(0); @@ -296,7 +296,6 @@ public class LbrynetService extends PythonService { JSONArray fileItems = result.optJSONArray("items"); if (fileItems != null) { try { - //List itemUris = new ArrayList(); for (int i = 0; i < fileItems.length(); i++) { JSONObject item = fileItems.getJSONObject(i); String downloadPath = item.isNull("download_path") ? null : item.getString("download_path");