mirror of
https://github.com/mirror/jdownloader.git
synced 2024-11-23 03:59:51 +00:00
refs #UHQC9555-SWRO-2460VASP
git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@49871 ebf7c1c2-ba36-0410-9fe8-c592906822b4 Former-commit-id: b97057673fb8656aee6e7d1212ebbfbd6680e7b2
This commit is contained in:
parent
31d439247a
commit
de7c3434b4
@ -49,6 +49,11 @@ public interface RemoteAPIConfig extends ConfigInterface {
|
||||
|
||||
void setDeprecatedApiEnabled(boolean b);
|
||||
|
||||
@DefaultBooleanValue(true)
|
||||
public void setHeadlessMyJDownloaderMandatory(boolean b);
|
||||
|
||||
public boolean isHeadlessMyJDownloaderMandatory();
|
||||
|
||||
@AboutConfig
|
||||
@DefaultIntValue(3128)
|
||||
int getDeprecatedApiPort();
|
||||
|
@ -9,6 +9,7 @@ import org.appwork.shutdown.ShutdownController;
|
||||
import org.appwork.shutdown.ShutdownRequest;
|
||||
import org.appwork.shutdown.ShutdownVetoException;
|
||||
import org.appwork.shutdown.ShutdownVetoListener;
|
||||
import org.appwork.storage.config.JsonConfig;
|
||||
import org.appwork.storage.config.ValidationException;
|
||||
import org.appwork.storage.config.events.GenericConfigEventListener;
|
||||
import org.appwork.storage.config.handler.KeyHandler;
|
||||
@ -19,6 +20,7 @@ import org.appwork.utils.Regex;
|
||||
import org.appwork.utils.StringUtils;
|
||||
import org.appwork.utils.logging2.LogSource;
|
||||
import org.appwork.utils.swing.dialog.DialogNoAnswerException;
|
||||
import org.jdownloader.api.RemoteAPIConfig;
|
||||
import org.jdownloader.api.myjdownloader.MyJDownloaderSettings.MyJDownloaderError;
|
||||
import org.jdownloader.api.myjdownloader.api.MyJDownloaderAPI;
|
||||
import org.jdownloader.api.myjdownloader.event.MyJDownloaderEvent;
|
||||
@ -101,7 +103,8 @@ public class MyJDownloaderController implements ShutdownVetoListener, GenericCon
|
||||
}
|
||||
|
||||
public final boolean isAlwaysConnectRequired() {
|
||||
return Application.isHeadless() && CFG_MYJD.CFG.isHeadlessAutoConnectEnabled();
|
||||
final RemoteAPIConfig remoteAPIConfig = JsonConfig.create(RemoteAPIConfig.class);
|
||||
return Application.isHeadless() && (remoteAPIConfig.isHeadlessMyJDownloaderMandatory() || !remoteAPIConfig.isDeprecatedApiEnabled());
|
||||
}
|
||||
|
||||
private MyJDownloaderController() {
|
||||
|
@ -104,11 +104,6 @@ public interface MyJDownloaderSettings extends ConfigInterface {
|
||||
|
||||
public boolean isAutoConnectEnabledV2();
|
||||
|
||||
@DefaultBooleanValue(true)
|
||||
public void setHeadlessAutoConnectEnabled(boolean b);
|
||||
|
||||
public boolean isHeadlessAutoConnectEnabled();
|
||||
|
||||
@AboutConfig
|
||||
@DefaultEnumValue("LAN")
|
||||
@RequiresRestart("A JDownloader Restart is Required")
|
||||
|
Loading…
Reference in New Issue
Block a user