<programs>
<notification>
- <from>erik@brakkee.org</from>
+ <from>kiss@brakkee.org</from>
<to>erik@brakkee.org</to>
- <subject>KiSS Crawler Update</subject>
+ <subject>Recording summary for today</subject>
<smtp>
<host>falcon</host>
<port>25</port>
<match field="description">horror|actie|thriller</match>
</program>
+ <program>
+ <category>wetenschap</category>
+ <action>notify</action>
+ <match field="description">wetenschap</match>
+ </program>
+
<program>
<category>science fiction</category>
<action>notify</action>
- <match field="description">(sci-fi)|(science fiction)</match>
+ <match field="description">sf-|(sci-fi)|(science fiction)</match>
</program>
<program>
<category>documentaires</category>
- <action>notify</action>
<match>(zembla)|(uur.*wolf)|(andere tijden)</match>
</program>
<program>
+ <priority>20</priority>
<match>star.*gate</match>
</program>
</program>
<program>
+ <priority>9</priority>
+ <match>lois.*clark</match>
+ </program>
+
+ <program>
+ <priority>8</priority>
+ <match>jag</match>
+ </program>
+
+ <program>
+ <priority>5</priority>
<match>shouf shouf</match>
</program>
</program>
<program>
+ <category>wetenschap</category>
<action>notify</action>
<match>brainiac</match>
</program>
- <program>
- <match>lois.*clark</match>
- </program>
-
</programs>
*/
public class Time implements Comparable {
+ /**
+ *
+ */
+ private static final int HOURS_PER_DAY = 24;
+
+ /**
+ *
+ */
+ private static final int EARLY_HOUR = 3;
+
/**
* Number of seconds per minute.
*/
* @return Converted value.
*/
float asFloat() {
- return (float) _hour + (float) _minute / (float) SECONDS_PER_MINUTE;
+ int hour = _hour;
+ // Hack to make sure that programs appearing shortly after midnight are sorted
+ // after those running during the day.
+ if ( hour <= EARLY_HOUR ) {
+ hour += HOURS_PER_DAY;
+ }
+ return (float) hour + (float) _minute / (float) SECONDS_PER_MINUTE;
}
/*