X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=crawler%2Fkiss%2Fsrc%2Forg%2Fwamblee%2Fcrawler%2Fkiss%2Fguide%2FProgram.java;h=44bdc52110b6b36a9e5e59163d5d91553d6601d0;hb=9a7549ba39d26974b00d99569819c1239f080049;hp=241089b1e7de507d8189a1f1081f386d6ad2eb04;hpb=e197a79e43f3e687635d0c30719a5531ed4f7662;p=utils diff --git a/crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java b/crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java index 241089b1..44bdc521 100644 --- a/crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java +++ b/crawler/kiss/src/org/wamblee/crawler/kiss/guide/Program.java @@ -52,7 +52,7 @@ public class Program { * Lexicographical comparison of programs based on (time, title, channel). * */ - public static class TimeSorter implements Comparator { + public static class TimeComparator implements Comparator { /** * Lexicographical comparison based on start time, program name, and @@ -93,42 +93,27 @@ public class Program { /** * Successfully recorded. */ - OK("Successfully recorded programs"), + OK, /** * Already recorded program. */ - DUPLICATE("Already recorded programs"), + DUPLICATE, /** * Recording conflict with another program. */ - CONFLICT("Programs in conflict with another recorded program"), + CONFLICT, /** * Program occurred in the past. */ - OLDSHOW("Programs that occurred in the past"), + OLDSHOW, /** * Program could not be recorded for technical reasons. */ - ERROR("Programs that could not be recorded for technical reasons"); - - private String _description; - - private RecordingResult(String aDescription) { - _description = aDescription; - } - - /** - * Gets the description. - * - * @return Description. - */ - public String getDescription() { - return _description; - } + ERROR; }; /** @@ -246,11 +231,7 @@ public class Program { */ public boolean isRecordingPossible() { try { - Action record = _programInfo.execute().getAction(RECORD_ACTION); - if (record == null) { - return false; - } - return true; + return _programInfo.execute().getAction(RECORD_ACTION) != null; } catch (PageException e) { return false; }