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,10 +79,14 @@ public class NextGenLocalRecorder implements Recorder {
this.config = config; this.config = config;
recordingManager = new RecordingManager(config, sites); recordingManager = new RecordingManager(config, sites);
config.getSettings().models.stream().forEach((m) -> { config.getSettings().models.stream().forEach((m) -> {
if (m.getSite().isEnabled()) { if (m.getSite() != null) {
models.add(m); if (m.getSite().isEnabled()) {
models.add(m);
} else {
LOG.info("{} disabled -> ignoring {}", m.getSite().getName(), m.getName());
}
} else { } else {
LOG.info("{} disabled -> ignoring {}", m.getSite().getName(), m.getName()); LOG.info("Site for model {} is unknown -> ignoring", m.getName());
} }
}); });