Fix Showup.tv loading of overviews and thumbnails

This commit is contained in:
0xb00bface 2022-10-15 17:35:33 +02:00
parent 578a10a2b6
commit 67a8aa1b26
1 changed files with 4 additions and 12 deletions

View File

@ -9,7 +9,6 @@ import ctbrec.Model;
import ctbrec.io.HttpException;
import ctbrec.recorder.Recorder;
import ctbrec.ui.AutosizeAlert;
import ctbrec.ui.CamrecApplication;
import ctbrec.ui.Icon;
import ctbrec.ui.SiteUiFactory;
import ctbrec.ui.action.EditGroupAction;
@ -256,16 +255,9 @@ public class ThumbCell extends StackPane {
private void recordingInidicatorClicked(MouseEvent evt) {
switch (modelRecordingState) {
case RECORDING:
pauseResumeAction(true);
break;
case PAUSED:
pauseResumeAction(false);
break;
case BOOKMARKED:
forgetModel();
break;
default:
case RECORDING -> pauseResumeAction(true);
case PAUSED -> pauseResumeAction(false);
case BOOKMARKED -> forgetModel();
}
}
@ -435,7 +427,7 @@ public class ThumbCell extends StackPane {
.header(USER_AGENT, Config.getInstance().getSettings().httpUserAgent)
.header(REFERER, getModel().getSite().getBaseUrl())
.build();
try (Response resp = CamrecApplication.httpClient.execute(req)) {
try (Response resp = model.getSite().getHttpClient().execute(req)) {
if (resp.isSuccessful()) {
double width = 480;
double height = width * imgAspectRatio;