Compare commits

..

No commits in common. 'b3532a4b7fa15989b72e6912ec3611b3472516ab' and 'b25804d5d7ee978eb0815a8a7a7a4ee2ee49514d' have entirely different histories.

  1. 6
      app/src/main/java/org/transdroid/daemon/adapters/qBittorrent/QBittorrentAdapter.java

6
app/src/main/java/org/transdroid/daemon/adapters/qBittorrent/QBittorrentAdapter.java

@ -237,12 +237,10 @@ public class QBittorrentAdapter implements IDaemonAdapter { @@ -237,12 +237,10 @@ public class QBittorrentAdapter implements IDaemonAdapter {
JSONArray allTorrentsResult = new JSONArray(makeRequest(log, path));
final List<Torrent> torrentsList = parseJsonTorrents(allTorrentsResult);
JSONArray allLabelsResult = null;
JSONArray allLabelsResult;
if (version >= 40100) {
allLabelsResult = new JSONObject(makeRequest(log, "/api/v2/torrents/categories")).names();
}
// either version < 40100 or no labels
if (allLabelsResult == null) {
} else {
allLabelsResult = new JSONArray();
}
final List<Label> labelList = parseJsonLabels(allLabelsResult, allTorrentsResult);

Loading…
Cancel
Save