use of net.pms.external.DebugPacker in project UniversalMediaServer by UniversalMediaServer.
the class DbgPacker method poll.
private void poll() {
// call the client callbacks
for (ExternalListener listener : ExternalFactory.getExternalListeners()) {
if (listener instanceof DebugPacker) {
LOGGER.debug("Found client {}", listener.name());
Object obj = ((DebugPacker) listener).dbgpack_cb();
if (obj instanceof String) {
add(((String) obj).split(","));
} else if (obj instanceof String[]) {
add((String[]) obj);
}
}
}
PmsConfiguration configuration = PMS.getConfiguration();
// check dbgpack property in UMS.conf
LOGGER.debug("Checking dbgpack property in UMS.conf");
String f = (String) configuration.getCustomProperty("dbgpack");
if (f != null) {
add(f.split(","));
}
// add confs of connected renderers
for (RendererConfiguration r : RendererConfiguration.getConnectedRenderersConfigurations()) {
add(r.getFile());
if (((DeviceConfiguration) r).isCustomized()) {
add(((DeviceConfiguration) r).getParentFile());
}
}
// add core items with the default logfile last (LinkedHashMap preserves insertion order)
String profileDirectory = configuration.getProfileDirectory();
// add virtual folders file if it exists
String vfolders = configuration.getVirtualFoldersFile(null);
if (StringUtils.isNotEmpty(vfolders)) {
add(new File(profileDirectory, vfolders));
}
add(new File(profileDirectory, "WEB.conf"));
add(new File(configuration.getProfilePath()));
if (defaultLogFile != null && !defaultLogFile.isEmpty()) {
add(new File(defaultLogFile + ".prev"));
add(new File(defaultLogFile));
}
}
Aggregations