Changeset 179:b7782e89cf13
- Timestamp:
- 11/26/08 04:01:54 (3 years ago)
- Author:
- cfreeze@…
- Branch:
- CAP_1.1
- Message:
-
change up the mythtv alert a bit..
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r122
|
r179
|
|
| 64 | 64 | return str |
| 65 | 65 | |
| | 66 | def __trim(self,str): |
| | 67 | if(str): |
| | 68 | str = str.strip() |
| | 69 | str = str.replace("\n"," ") |
| | 70 | return str |
| | 71 | |
| 66 | 72 | def send(self,alert): |
| 67 | | msg = "<?xml version=\"1.0\"?>\n<mythnotify version=\"1\">" + \ |
| 68 | | "<container name=\"notify_alert_text\">\n" + \ |
| 69 | | "<textarea name=\"notify_text\"><value>" + alert.terse + "</value></textarea>\n" + \ |
| | 73 | alert_text = self.__trim(alert.headline + " issued at " + alert.issued + "..." + alert.description + "..." + " Alert expires at " + alert.expires) |
| | 74 | print "SENDING: %s" % alert_text |
| | 75 | msg = "<?xml version=\"1.0\"?>\n<mythnotify version=\"1\" displaytime=\"-1\">" + \ |
| | 76 | "<container name=\"news_scroller\">\n" + \ |
| | 77 | "<textarea name=\"text_scroll\"><value>" + alert_text + "</value></textarea>\n" + \ |
| 70 | 78 | "</container>" + \ |
| 71 | 79 | "</mythnotify>\n"; |