From d29ed50f7fafd81d647436a96c15a2f8e5847c21 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Thu, 15 Sep 2011 23:08:15 +0000 Subject: [PATCH] allow scheduling reminders; flag for reboot after event cancel git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@402 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- var/mongoose/cgi-bin/epg_schedule.jim | 4 ++-- var/mongoose/cgi-bin/sched_cancel.jim | 4 +++- var/mongoose/lib/epg_popup | 2 ++ var/mongoose/lib/rsv.class | 5 +++++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 1dbd51a..f306a23 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 0.7.0-1 +Version: 0.7.0-2 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4),jim-oo,jim-pack,service-control,busybox(>=1.18.3-1),lsof,epg(>=1.0.3),hmt(>=1.0.6),ssmtp diff --git a/var/mongoose/cgi-bin/epg_schedule.jim b/var/mongoose/cgi-bin/epg_schedule.jim index a24e3c8..51b4823 100755 --- a/var/mongoose/cgi-bin/epg_schedule.jim +++ b/var/mongoose/cgi-bin/epg_schedule.jim @@ -33,9 +33,9 @@ if {[$event percent] > 0} { set r [rsv construct $event $type] if {[catch {$r insert} msg]} { - puts "Error encountered while scheduling the recording: $msg" + puts "Error encountered while scheduling: $msg" } else { - puts "Successfully scheduled recording of [$event get name]" + puts "Successfully scheduled [$event get name]" system restartpending } diff --git a/var/mongoose/cgi-bin/sched_cancel.jim b/var/mongoose/cgi-bin/sched_cancel.jim index a63cfe1..cd4317f 100755 --- a/var/mongoose/cgi-bin/sched_cancel.jim +++ b/var/mongoose/cgi-bin/sched_cancel.jim @@ -2,7 +2,7 @@ package require cgi source /mod/var/mongoose/lib/setup -require rsv.class +require rsv.class system.class puts "Content-Type: text/html" puts "" @@ -24,3 +24,5 @@ $event clear_ulslot $event set_delete $event insert +system restartpending + diff --git a/var/mongoose/lib/epg_popup b/var/mongoose/lib/epg_popup index 8e2b097..52d09b9 100644 --- a/var/mongoose/lib/epg_popup +++ b/var/mongoose/lib/epg_popup @@ -14,6 +14,7 @@ $(document).ready(function() { .load('/cgi-bin/restartblock.jim'); }); $(":button:contains('Record')").fadeOut('slow'); + $(":button:contains('Reminder')").fadeOut('slow'); } var $buttons1 = { @@ -21,6 +22,7 @@ $(document).ready(function() { }; var $buttons2 = $.extend( {"Record Programme": function() { doschedule(1) }}, + {"Set Reminder": function() { doschedule(3) }}, $buttons1); var $buttons3 = $.extend( {"Record Series": function() { doschedule(2) }}, diff --git a/var/mongoose/lib/rsv.class b/var/mongoose/lib/rsv.class index 3fea91a..814eddf 100755 --- a/var/mongoose/lib/rsv.class +++ b/var/mongoose/lib/rsv.class @@ -345,6 +345,11 @@ proc {rsv construct} {event type} { $args(szEventToRecord) } } + } elseif {$type == 3} { + # Reminder + set args(ersvtype) 2 + set args(szsttime) [clock format $args(nsttime) \ + -format {%Y%m%d%H%M%S}] } else { # Series set args(ucCRIDType) 50