summaryrefslogtreecommitdiff
path: root/javascript
diff options
context:
space:
mode:
authorM. Voerman <rekordc@gmail.com>2015-01-08 12:43:29 +0100
committerM. Voerman <rekordc@gmail.com>2015-01-08 12:43:29 +0100
commitaa6d147606b79479ea57f257d4ddb2776cebcce8 (patch)
tree2be384fcc158008ac40b4bce015a60077baa0e32 /javascript
parenteb673d0b4b1e3f04bf5ac4f1226b218a812048fe (diff)
downloadvdr-vipclient-aa6d147606b79479ea57f257d4ddb2776cebcce8.tar.gz
vdr-vipclient-aa6d147606b79479ea57f257d4ddb2776cebcce8.tar.bz2
fixed osd info if time/date isn't right
swap prev <> current channel with 0
Diffstat (limited to 'javascript')
-rw-r--r--javascript/main.js63
-rw-r--r--javascript/settings.js7
2 files changed, 49 insertions, 21 deletions
diff --git a/javascript/main.js b/javascript/main.js
index f18a8d2..9b3c405 100644
--- a/javascript/main.js
+++ b/javascript/main.js
@@ -1051,10 +1051,16 @@ function onKeyDown(event) {
break;
case KEY_B:// hh key on old long kpn 1710/1760 remote
if (prevChan !== currChan) {
- currChan = [prevChan, prevChan = currChan][0];
- count = 0;
- play(channels[currChan]);
+ // check if Group isn't protected
+ var i = Number(Left((prevChan / 1000),1));
+ if ((protChn[i] == 1) && (ShowProtectedChannels == 1)) {
+ // if protected don't do it ;)
+ } else {
+ currChan = [prevChan, prevChan = currChan][0];
+ count = 0;
+ play(channels[currChan]);
}
+ }
break;
case KEY_C:// @ key on old long kpn 1710/1760 remote
if(isFullscreen && Fav_max_channel !== 0 && ChanGroup !== Fav_group) {
@@ -1268,7 +1274,7 @@ function Read_Fav() {
function Makedigit() {
if (TimedChangeID != -1) { clearTimeout(TimedChangeID); TimedChangeID = -1; }
-
+ oldChan = prevChan; // used for swap last channels with 0
prevChan = currChan;
Change = (Change*10) + digit;
count += 1;
@@ -1297,22 +1303,35 @@ function Makedigit() {
function CheckChannel(CheckThis) {
// function to check if channel exists
- CheckThis = baseChn[ChanGroup] + CheckThis;
- if(channels[CheckThis]) {
- ChangeOK = 1;
- currChan = CheckThis;
+// or swap prev <> currchan
+
+ if (CheckThis == 0 && oldChan !== currChan) {
+ // check if Group isn't protected
+ var i = Number(Left((oldChan / 1000),1));
+ if ((protChn[i] == 1) && (ShowProtectedChannels == 1)) {
+ ChangeOK = 0;
+ } else {
+ currChan = oldChan;
+ ChangeOK = 1;
+ }
} else {
- ChangeOK = 0;
- }
- if(prevChan == currChan) {
- ChangeOK = 0 ;
+ CheckThis = baseChn[ChanGroup] + CheckThis;
+ if(channels[CheckThis]) {
+ ChangeOK = 1;
+ currChan = CheckThis;
+ } else {
+ ChangeOK = 0;
+ }
+ if(prevChan == currChan) {
+ ChangeOK = 0 ;
+ }
}
+
osdmain.style.opacity = 0;
if(isFullscreen) {
- showDisplay(currChan.toString(), false, 100, 0 );
+ showDisplay(currChan.toString(), false, 100, 0 );
}
Change = 0;
-
}
function TimedChange() {
@@ -1424,15 +1443,23 @@ function updateOSDtime(timchan) {
tijd = new Date(tijd);
dateCurrent = new Date();
var EPGminutes = Math.floor((dateCurrent.getTime() - date.getTime()) /1000/60);
- if (EPGminutes > 1440) {
- EPGminutes = 0; // Duration is >24h, maybe current time isn't right.
- }
var tm = tijd.getMinutes();
var th = tijd.getHours();
th=addzero(th);
tm=addzero(tm);
- EPG[0][7][timchan] = th + ":" + tm + " (" + EPGminutes + " / " + ((EPG[0][3][timchan])-EPGminutes).toFixed(0) + ")" + " " + EPG[0][1][timchan] + " ";
+ EPG[0][7][timchan] = th + ":" + tm + " (";
+
+ alert (Number(EPGminutes));
+
+ if (Number(EPGminutes) > 1440 || Number(EPGminutes) < -1440 ) {
+ // Duration is >24h, maybe current time isn't right.
+ EPG[0][7][timchan] += EPG[0][3][timchan];
+ } else {
+ EPG[0][7][timchan] += EPGminutes + " / " + ((EPG[0][3][timchan])-EPGminutes).toFixed(0);
+ }
+
+ EPG[0][7][timchan] += ")" + " " + EPG[0][1][timchan] + " ";
if (!EPG[0][2][timchan] || ((EPG[0][3][timchan]-EPGminutes) < 0))
{
EPG[0][7][timchan] = " ";
diff --git a/javascript/settings.js b/javascript/settings.js
index cb922f2..7516325 100644
--- a/javascript/settings.js
+++ b/javascript/settings.js
@@ -2,7 +2,7 @@
// Default settings
//
-var Version = "0.26.10";
+var Version = "0.26.11";
server_ip_array = new Array("http://192.168.1.15","http://192.168.3.15","http://192.168.178.56","http://192.168.3.100","http://192.168.178.19","http://192.168.1.21","http://192.168.2.100","http://192.168.178.52");
@@ -55,7 +55,7 @@ var fullupdate = 1; // If guideview is too slow, set it to 0 (for 1910/1960), fa
var ShowOsdTime = 5000; //Time to show OSD, in seconds * 1000
var ShowSetTimer = 3000; //Time to show set timer popup, in seconds * 1000
-var ChangeTime = 2000; // Time before the channel change happens (was only with OK)
+var ChangeTime = 1000; // Time before the channel change happens (was only with OK)
var serverEPGdays = 3 * (60 * 60 * 24); // the higher the longer you wait while getting the epg info
@@ -137,8 +137,9 @@ var isFullscreen = 1;
var Volume = StartVolume;
var AudioOut = 3; // AUDIO_CONNECTION_TYPE_ANALOG = 0; AUDIO_CONNECTION_TYPE_SPDIF = 1; AUDIO_CONNECTION_TYPE_HDMI = 2;AUDIO_CONNECTION_TYPE_DECODER = 3;AUDIO_CONNECTION_TYPE_BUFFER = 4;AUDIO_CONNECTION_TYPE_I2S = 5;
-var epgchan = currChan;
+//var epgchan = currChan;
var prevChan = currChan;
+var oldChan;
var channels = new Array();
var channelsnames = new Array();