stream_manager changed to file_manager

This commit is contained in:
Akinwale Ariwodola 2020-05-14 00:25:37 +01:00
parent 74d9b8f1e5
commit 9719496b57

View file

@ -76,7 +76,7 @@ public final class LbrynetService extends PythonService {
private ScheduledExecutorService taskExecutor; private ScheduledExecutorService taskExecutor;
private ScheduledFuture taskExecutorHandle = null; private ScheduledFuture taskExecutorHandle = null;
private boolean streamManagerReady = false; private boolean fileManagerReady = false;
@Override @Override
public boolean canDisplayNotification() { public boolean canDisplayNotification() {
@ -208,7 +208,7 @@ public final class LbrynetService extends PythonService {
private void pollFileList() { private void pollFileList() {
try { try {
if (!streamManagerReady) { if (!fileManagerReady) {
String statusResponse = Utils.sdkCall("status"); String statusResponse = Utils.sdkCall("status");
if (statusResponse != null) { if (statusResponse != null) {
JSONObject status = new JSONObject(statusResponse); JSONObject status = new JSONObject(statusResponse);
@ -219,13 +219,13 @@ public final class LbrynetService extends PythonService {
JSONObject result = status.getJSONObject("result"); JSONObject result = status.getJSONObject("result");
if (result.has("startup_status")) { if (result.has("startup_status")) {
JSONObject startupStatus = result.getJSONObject("startup_status"); JSONObject startupStatus = result.getJSONObject("startup_status");
streamManagerReady = startupStatus.has("stream_manager") && startupStatus.getBoolean("stream_manager"); fileManagerReady = startupStatus.has("file_manager") && startupStatus.getBoolean("file_manager");
} }
} }
} }
} }
if (streamManagerReady) { if (fileManagerReady) {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("page_size", 100); params.put("page_size", 100);
params.put("reverse", true); params.put("reverse", true);