forked from j62/ctbrec
1
0
Fork 0

Handle models with unknown site

Make sure, the recorder does not crash, if a model with unknown site
exists in the condif
This commit is contained in:
0xboobface 2019-07-21 10:46:19 +02:00
parent 1db79541ff
commit d798069a71
1 changed files with 7 additions and 3 deletions

View File

@ -79,11 +79,15 @@ public class NextGenLocalRecorder implements Recorder {
this.config = config;
recordingManager = new RecordingManager(config, sites);
config.getSettings().models.stream().forEach((m) -> {
if (m.getSite() != null) {
if (m.getSite().isEnabled()) {
models.add(m);
} else {
LOG.info("{} disabled -> ignoring {}", m.getSite().getName(), m.getName());
}
} else {
LOG.info("Site for model {} is unknown -> ignoring", m.getName());
}
});
recording = true;