fix queued download file_list response handling

This commit is contained in:
Akinwale Ariwodola 2020-01-17 06:44:43 +01:00
parent 1d8a7d838b
commit 94d1f5a4eb
2 changed files with 2 additions and 3 deletions

2
app

@ -1 +1 @@
Subproject commit 5df8b8c4aa2b13070a0f46d6ca27e6178398da28
Subproject commit df3a9587c04a7730338d835b2ecad066855ca1af

View file

@ -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<String> itemUris = new ArrayList<String>();
for (int i = 0; i < fileItems.length(); i++) {
JSONObject item = fileItems.getJSONObject(i);
String downloadPath = item.isNull("download_path") ? null : item.getString("download_path");