summaryrefslogtreecommitdiff
path: root/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'javascript')
-rw-r--r--javascript/main.js33
-rw-r--r--javascript/settings.js6
2 files changed, 20 insertions, 19 deletions
diff --git a/javascript/main.js b/javascript/main.js
index 977427b..dfb6d4b 100644
--- a/javascript/main.js
+++ b/javascript/main.js
@@ -68,21 +68,22 @@ function onLoad() {
colorkeys.innerHTML = "<pre class=colorkeys" + cssres[css_nr][Set_Res] + ">" + "<span class=redkey> " + NN[4] + " </span><span class=greenkey > " + NN[1] + " </span><span class=yellowkey> " + NN[2] + " </span><span class=bluekey> " + NN[5] + " </span></pre>";
medialist.innerHTML = "<h1 class=mainmenu" + cssres[css_nr][Set_Res] + ">" + Lang[0] + "</h1>";
- //Make daily event to switch channel, reload or go to standby
- var today = new Date;
- today = today / 1000;
- var x = ss.getBookingIds("Cron", today, 0)
- if (x.length == 0) {
- var today = new Date();
- var crontime = new Date(today);
- if (crontime.getHours() > (Cron_hour - 1) ) {
- crontime.setDate(today.getDate()+1);
- }
- crontime.setHours(Cron_hour);
- crontime.setMinutes(Cron_min);
- settimer(crontime.getTime()/1000,"-",0,5,"-","-",Cron_Action.toString()); // Cron_Action
- }
-
+ if (Cron_Action) {
+ //Make daily event to switch channel, reload or go to standby
+ var today = new Date;
+ today = today / 1000;
+ var x = ss.getBookingIds("Cron", today, 0)
+ if (x.length == 0) {
+ var today = new Date();
+ var crontime = new Date(today);
+ if (crontime.getHours() > (Cron_hour - 1) ) {
+ crontime.setDate(today.getDate()+1);
+ }
+ crontime.setHours(Cron_hour);
+ crontime.setMinutes(Cron_min);
+ settimer(crontime.getTime()/1000,"-",0,5,"-","-",Cron_Action.toString()); // Cron_Action
+ }
+ }
if (Cron_reload) {
var today = new Date;
today = today / 1000;
@@ -1573,7 +1574,7 @@ if (!BackGroundColor) { BackGroundColor = color_default;}
if (ProgEvID == 1) {
ss.setParameter(x, "Title", "Standby" );
} else if (ProgEvID == 2) {
- ss.setParameter(x, "Title", "Switchto" );
+ ss.setParameter(x, "Title", "Switch to" );
} else {
ss.setParameter(x, "Title", "No Action" );
}
diff --git a/javascript/settings.js b/javascript/settings.js
index ac25344..87a2090 100644
--- a/javascript/settings.js
+++ b/javascript/settings.js
@@ -17,9 +17,9 @@ var Global_Multicast = 0;// 1 = use only MultiCast
var txtfull_screen = 1;// 0 = 50/50 % txt/tv, 1 = 100% txt
var KeepTrying = 1;//No display of error, but keep trying to restart the stream
var TryingInterval = 30 * 1000; // 30 Seconds.
-var Cron_Action = 1; //0= off, 1 = box turns standby, 2 switch to preset channel
-var Cron_reload = 0; // if set reload script at cron_hour / cron_min -1
-var Cron_switch_channel = 9051; //Channel to switch to
+var Cron_Action; //0= off, 1 = box turns standby, 2 switch to preset channel
+var Cron_reload; // if set reload script at cron_hour / cron_min -1
+var Cron_switch_channel; //Channel to switch to, if not set current channel.
var Cron_hour = 05;// Hour for cron job
var Cron_min = 00; // Minute for cron job