Clean up code
This commit is contained in:
parent
c8e3db4021
commit
7f3bedd3a1
|
@ -26,7 +26,6 @@ public class Cam4HttpClient extends HttpClient {
|
||||||
@Override
|
@Override
|
||||||
public boolean login() throws IOException {
|
public boolean login() throws IOException {
|
||||||
BlockingQueue<Boolean> queue = new LinkedBlockingQueue<>();
|
BlockingQueue<Boolean> queue = new LinkedBlockingQueue<>();
|
||||||
LOG.debug("Launching dialog");
|
|
||||||
|
|
||||||
Runnable showDialog = () -> {
|
Runnable showDialog = () -> {
|
||||||
// login with javafx WebView
|
// login with javafx WebView
|
||||||
|
@ -46,7 +45,6 @@ public class Cam4HttpClient extends HttpClient {
|
||||||
showDialog.run();
|
showDialog.run();
|
||||||
} else {
|
} else {
|
||||||
Platform.runLater(showDialog);
|
Platform.runLater(showDialog);
|
||||||
LOG.debug("waiting for queue");
|
|
||||||
try {
|
try {
|
||||||
queue.take();
|
queue.take();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
@ -55,7 +53,6 @@ public class Cam4HttpClient extends HttpClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
loggedIn = checkLoginSuccess();
|
loggedIn = checkLoginSuccess();
|
||||||
return loggedIn;
|
return loggedIn;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,11 +25,9 @@ public class Cam4TabProvider extends TabProvider {
|
||||||
|
|
||||||
tabs.add(createTab("Female", cam4.getBaseUrl() + "/directoryResults?online=true&gender=female&orderBy=MOST_VIEWERS"));
|
tabs.add(createTab("Female", cam4.getBaseUrl() + "/directoryResults?online=true&gender=female&orderBy=MOST_VIEWERS"));
|
||||||
tabs.add(createTab("HD", cam4.getBaseUrl() + "/directoryResults?online=true&hd=true&orderBy=VIDEO_QUALITY"));
|
tabs.add(createTab("HD", cam4.getBaseUrl() + "/directoryResults?online=true&hd=true&orderBy=VIDEO_QUALITY"));
|
||||||
if(cam4.credentialsAvailable()) {
|
|
||||||
Cam4FollowedTab followed = new Cam4FollowedTab(cam4);
|
Cam4FollowedTab followed = new Cam4FollowedTab(cam4);
|
||||||
followed.setRecorder(recorder);
|
followed.setRecorder(recorder);
|
||||||
tabs.add(followed);
|
tabs.add(followed);
|
||||||
}
|
|
||||||
|
|
||||||
return tabs;
|
return tabs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue