List<Program> programs = matcher.getMatches();
EnumMap<RecordingResult, List<Program>> messages = new EnumMap<RecordingResult, List<Program>>(
RecordingResult.class);
- for (RecordingResult result: RecordingResult.values()) {
+ for (RecordingResult result : RecordingResult.values()) {
messages.put(result, new ArrayList<Program>());
}
for (Program program : programs) {
- try {
- Program.RecordingResult result = program.record();
- messages.get(result).add(program);
- } catch (PageException e) {
- LOG.info("Attempt to record " + program + " failed.");
- messages.get(RecordingResult.ERROR).add(program);
- }
+ Program.RecordingResult result = program.record();
+ messages.get(result).add(program);
}
String msg = "Summary of KiSS crawler: \n\n\n";
-
-
- for (RecordingResult result: RecordingResult.values()) {
- if ( messages.get(result).size() > 0 ) {
- msg += result.getDescription() + "\n\n";
- for (Program program: messages.get(result)) {
+
+ for (RecordingResult result : RecordingResult.values()) {
+ if (messages.get(result).size() > 0) {
+ msg += result.getDescription() + "\n\n";
+ for (Program program : messages.get(result)) {
msg += program + "\n";
}
}
}
- if ( programs.size() == 0 ) {
- msg += "No suitable programs found";
+ if (programs.size() == 0) {
+ msg += "No suitable programs found";
}
-
+
System.out.println(msg);
sendMail(msg);
}
Channel channel = createChannel(action.getName(), action
.execute().getAction("right-now").execute());
channels.add(channel);
- if ( SystemProperties.isDebugMode() ) {
- break; // Only one channel is crawled.
+ if (SystemProperties.isDebugMode()) {
+ break; // Only one channel is crawled.
}
} catch (PageException e) {
LOG.error("Could not create channel information for '"