Rename Recorder.isRecording to Recorder.isTracked

This commit is contained in:
0xboobface 2019-02-05 14:45:44 +01:00
parent 198a9c6893
commit 76f4583ebc
5 changed files with 9 additions and 9 deletions

View File

@ -97,7 +97,7 @@ public class ThumbCell extends StackPane {
this.thumbCellList = parent.grid.getChildren();
this.model = model;
this.recorder = recorder;
recording = recorder.isRecording(model);
recording = recorder.isTracked(model);
model.setSuspended(recorder.isSuspended(model));
this.setStyle("-fx-background-color: -fx-base");
@ -576,7 +576,7 @@ public class ThumbCell extends StackPane {
private void update() {
model.setSuspended(recorder.isSuspended(model));
setRecording(recorder.isRecording(model));
setRecording(recorder.isTracked(model));
setImage(model.getPreview());
String txt = recording ? " " : "";
txt += model.getDescription() != null ? model.getDescription() : "";

View File

@ -444,7 +444,7 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
start.setOnAction((e) -> startStopAction(getSelectedThumbCells(cell), true));
MenuItem stop = new MenuItem("Stop Recording");
stop.setOnAction((e) -> startStopAction(getSelectedThumbCells(cell), false));
MenuItem startStop = recorder.isRecording(cell.getModel()) ? stop : start;
MenuItem startStop = recorder.isTracked(cell.getModel()) ? stop : start;
MenuItem pause = new MenuItem("Pause Recording");
pause.setOnAction((e) -> pauseResumeAction(getSelectedThumbCells(cell), true));
@ -510,7 +510,7 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
contextMenu.setHideOnEscape(true);
contextMenu.setAutoFix(true);
contextMenu.getItems().addAll(openInPlayer, startStop);
if(recorder.isRecording(cell.getModel())) {
if(recorder.isTracked(cell.getModel())) {
contextMenu.getItems().add(pauseResume);
}
if(site.supportsFollow()) {
@ -738,7 +738,7 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
ObservableList<Node> thumbs = grid.getChildren();
for (int i = thumbs.size()-1; i > 0; i--) {
ThumbCell thumb = (ThumbCell) thumbs.get(i);
if(recorder.isRecording(thumb.getModel())) {
if(recorder.isTracked(thumb.getModel())) {
thumbs.remove(i);
thumbsToMove.add(0, thumb);
}

View File

@ -263,7 +263,7 @@ public class LocalRecorder implements Recorder {
}
@Override
public boolean isRecording(Model model) {
public boolean isTracked(Model model) {
lock.lock();
try {
return models.contains(model);
@ -345,7 +345,7 @@ public class LocalRecorder implements Recorder {
}
try {
boolean modelInRecordingList = isRecording(model);
boolean modelInRecordingList = isTracked(model);
boolean online = model.isOnline(IGNORE_CACHE);
if (modelInRecordingList && online) {
LOG.info("Restarting recording for model {}", model);

View File

@ -20,7 +20,7 @@ public interface Recorder {
* Returns true, if a model is in the list of models to record. This does not reflect, if there currently is a recording running. The model might be offline
* aswell.
*/
public boolean isRecording(Model model);
public boolean isTracked(Model model);
/**
* Get the list of all models, which are tracked by ctbrec

View File

@ -122,7 +122,7 @@ public class RemoteRecorder implements Recorder {
}
@Override
public boolean isRecording(Model model) {
public boolean isTracked(Model model) {
return models != null && models.contains(model);
}