summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--History8
-rw-r--r--index.html161
-rw-r--r--settings.js7
3 files changed, 124 insertions, 52 deletions
diff --git a/History b/History
index 85a17c9..f7aeea3 100644
--- a/History
+++ b/History
@@ -2,9 +2,9 @@ Tested on
Motorola Vip : 1960, 1910, 1903, 1963.
VDR 1.7.29 / 2.1.1
-0.24 vip.testing3 used for selecting getmarks from 0 = restfulapi, 1 = smartwebTV (not all users have the newest smartwebTV)
+0.24 vip.testing3 used for selecting getmarks from 0 = restfulapi, 1 = SmartTVWeb (not all users have the newest SmartTVWeb)
Channels update.
-
+ Selectable gettimer source. (de)activate/del/add timers only with SmartTVWeb
0.23 Infobox for connection Error, not only ERRR on display but also the Infobox
@@ -23,7 +23,7 @@ VDR 1.7.29 / 2.1.1
Sort the Recordingslist so no double maps are shown
Volume steps are 1, if volume < 5
in EPG/ Guide view you can switch groups with << and >> (Live Update only if 19x3 with pip enabled image)
- SmartwebTV getmarks added (no more restfulapi getmarks)
+ SmartTVWeb getmarks added (no more restfulapi getmarks)
0.22 Updated EPG filter for 42E, canal sat (tid 1088), canal+ (tid 1060), CDS (veronica, iConcerts, Animax)
@@ -33,7 +33,7 @@ VDR 1.7.29 / 2.1.1
Fix: 'epg now' (it wasn't always the right info on some UK channels.)
Added some channels for 42E to group 3
Updated channels.conf
- SmartwebTV timer handling added (No more restfulapi needed for timers)
+ SmartTVWeb timer handling added (No more restfulapi needed for timers)
Info about audio/video in Infobox when playing Recording
Date/Time info during play
Update dutch tv/radio channels on 19E
diff --git a/index.html b/index.html
index 737ed7f..77f7df0 100644
--- a/index.html
+++ b/index.html
@@ -2712,8 +2712,10 @@ function LoadTimers() {
function LoadTimersServer() {
-//Get timers from SmartTVweb
try {
+
+ if (testing4==1) {
+ //Get timers from SmartTVweb
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET",(server_ip + recServ + "/timers.xml?" + new Date().getTime()),false);
xmlhttp.send();
@@ -2750,7 +2752,40 @@ try {
timers[i] = timers[i] + timersDays[i] + "\uE003" + timersStrt[i] + "\uE003" + timersStop[i] + "\uE003" + Left(timersName[i],8) + "\uE003" + Left(timersFile[i],15) + "\n" ;
timerOK = 1;
}
+ } else {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(RestFulAPI + "/timers.xml"),false); // ?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("timer");
+ maxTimers = x.length;
+ for (var i=0;i<x.length;i++)
+ {
+ var fill = "\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003";
+ timersID[i] = x[i].getElementsByTagName("param")[0].childNodes[0].nodeValue;
+ timersFlag[i] = x[i].getElementsByTagName("param")[1].childNodes[0].nodeValue;
+ timersStrt[i] = Right("00" + x[i].getElementsByTagName("param")[2].childNodes[0].nodeValue,4);
+ timersStop[i] = Right("00" + x[i].getElementsByTagName("param")[3].childNodes[0].nodeValue,4);
+ timersDays[i] = x[i].getElementsByTagName("param")[9].childNodes[0].nodeValue;
+ if (timersDays[i] == "-------" ) {
+ timersDays[i] = x[i].getElementsByTagName("param")[10].childNodes[0].nodeValue;
+ } else {
+ timersDays[i] = timersDays[i] + "\uE003\uE003\uE003";
+ }
+ timersName[i] = x[i].getElementsByTagName("param")[15].childNodes[0].nodeValue + fill;
+ if (timersFlag[i] == "1") {
+ timer[i] = "\uE003\uE00C\uE003";
+ } else if (timersFlag[i] == "9") {
+ timer[i] = "\uE003\uE00B\uE003";
+ } else {
+ timer[i] = "\uE003\uE003\uE003";
+ }
+ timersFile[i] = x[i].getElementsByTagName("param")[14].childNodes[0].nodeValue + fill + fill;
+ timer[i] = timer[i] + timersDays[i] + "\uE003" + timersStrt[i] + "\uE003" + timersStop[i] + "\uE003" + Left(timersName[i],8) + "\uE003" + Left(timersFile[i],15) + "\n" ;
+ timerOK = 1;
+ }
+ }
} catch(e) {
timerOK = 0;
alert("Get Timers problem: " + e);
@@ -2759,24 +2794,27 @@ try {
}
function DeleteTimers() {
-try {
+if (testing4==1) {
+ try {
xmlhttp=new XMLHttpRequest();
-//
-// SmartTVWeb
-// xmlhttp.open("GET",(server_ip + recServ + "/deleteTimer?guid=" + timersChan[timerID] + "&dy=" + timersDay[timerID]
-// + "&st=" + timersStrt[timerID] + "&sp=" + timersStop[timerID] + "&" + new Date().getTime()),false);
+ //
+ // SmartTVWeb
+ // xmlhttp.open("GET",(server_ip + recServ + "/deleteTimer?guid=" + timersChan[timerID] + "&dy=" + timersDay[timerID]
+ // + "&st=" + timersStrt[timerID] + "&sp=" + timersStop[timerID] + "&" + new Date().getTime()),false);
xmlhttp.open("GET",(server_ip + recServ + "/deleteTimer?index=" + timersID[timerID] + "&" + new Date().getTime()),false);
xmlhttp.send();
} catch(e) {
alert("Deleting Timers problem: " + e);
}
+ }
}
function activate_timers(){
+if (testing4==1) {
// (De)activate timers.
-try {
+ try {
xmlhttp=new XMLHttpRequest();
if (timersFlag[timerID] == "0") {
@@ -2796,7 +2834,7 @@ try {
} catch(e) {
alert("(De)Activate Timers problem: " + e);
}
-
+ }
}
function ShowTimerInfo() {
@@ -3391,18 +3429,20 @@ function getRecList() {
MaxInGroup = 14;
subgroup = 0;
try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + recServ + recPath + "?" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- var x=xmlDoc.getElementsByTagName("item");
- nrMedia = x.length - 1;
- recTitl.length = 0;
- rec_lst.length = 0;
+ if (testing5==1) {
+ // get recordings from smartTVWeb
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + recServ + recPath + "?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("item");
+ nrMedia = x.length - 1;
+ recTitl.length = 0;
+ rec_lst.length = 0;
-if (UseNewReclist && recPath == "/recordings.xml") {
- for (var i=0;i<x.length;i++)
- {
+ if (UseNewReclist && recPath == "/recordings.xml") {
+ for (var i=0;i<x.length;i++)
+ {
rec_lst[i] = new Array();
for (var yy=0;yy<9;yy++) { rec_lst[i][yy] = new Array(); }
rec_lst[i][0] = (x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue);
@@ -3434,38 +3474,67 @@ if (UseNewReclist && recPath == "/recordings.xml") {
recChan[i] = rec_lst[i][7];
recProt[i] = rec_lst[i][8];
}
+ recProt[i] = 1;
+ } else {
+
+ // old recordings list function
+ // also used for media listing
+
+ for (var i=0;i<x.length;i++) {
+ recTitl[i] = (x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue);
+ recTitl[i] = recTitl[i].split("~");
+ // recLink[i] = (x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue);
+ recLink[i] = (x[i].getElementsByTagName("enclosure")[0].getAttribute('url'));
+ recDesc[i] = (x[i].getElementsByTagName("description")[0].childNodes[0].nodeValue);
+ recDura[i] = (x[i].getElementsByTagName("duration")[0].childNodes[0].nodeValue);
+ recStrt[i] = (x[i].getElementsByTagName("start")[0].childNodes[0].nodeValue);
+ rec_New[i] = (x[i].getElementsByTagName("isnew")[0].childNodes[0].nodeValue);
+ recGUID[i] = (x[i].getElementsByTagName("guid")[0].childNodes[0].nodeValue);
+ if (recPath == "/recordings.xml") {
+ //Get channel number from recordings
+ recDummy = recGUID[i].split(".");
+ recDummy = recDummy[(recDummy.length-2)].split("-");
+ recChan[i] = recDummy[0] + "\uE003-\uE003" + channelsnames[(recDummy[0])];
+ recProt[i] = protChn[Number(Left((recDummy[0] / 1000),1))];
+ } else {
+ //Media directory
+ recChan[i] = "Media File";
+ recProt[i] = 0; // No protection for Media Files.
+ }
+ }
+ // try to fix display double entries in the last directory. (Only shown for some time after deleting files, should be fixed now)
recProt[i] = 1;
- } else {
+ }
+} else if (testing5==2) {
+//get recordings from streamdev
+//no media directory or delete support
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + StreamPort + "recordings.rss?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("item");
+ nrMedia = x.length - 1;
+ recTitl.length = 0;
-// old recordings list function
-// also used for media listing
-
- for (var i=0;i<x.length;i++) {
- recTitl[i] = (x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue);
- recTitl[i] = recTitl[i].split("~");
-// recLink[i] = (x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue);
- recLink[i] = (x[i].getElementsByTagName("enclosure")[0].getAttribute('url'));
- recDesc[i] = (x[i].getElementsByTagName("description")[0].childNodes[0].nodeValue);
- recDura[i] = (x[i].getElementsByTagName("duration")[0].childNodes[0].nodeValue);
- recStrt[i] = (x[i].getElementsByTagName("start")[0].childNodes[0].nodeValue);
- rec_New[i] = (x[i].getElementsByTagName("isnew")[0].childNodes[0].nodeValue);
- recGUID[i] = (x[i].getElementsByTagName("guid")[0].childNodes[0].nodeValue);
- if (recPath == "/recordings.xml") {
- //Get channel number from recordings
- recDummy = recGUID[i].split(".");
- recDummy = recDummy[(recDummy.length-2)].split("-");
- recChan[i] = recDummy[0] + "\uE003-\uE003" + channelsnames[(recDummy[0])];
- recProt[i] = protChn[Number(Left((recDummy[0] / 1000),1))];
- } else {
- //Media directory
- recChan[i] = "Media File";
- recProt[i] = 0; // No protection for Media Files.
- }
- }
- // try to fix display double entries in the last directory. (Only shown for some time after deleting files, should be fixed now)
+ for (var i=0;i<x.length;i++)
+ {
+ recTitl[i] = (x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue);
+ recTitl[i] = recTitl[i].split("~");
+ recTitl[i] = (x[i].getElementsByTagName("enclosure")[0].getAttribute('url'));
+ recDesc[i] = "";
+ recDura[i] = "";
+ recStrt[i] = "";
+ rec_New[i] = "";
+ recGUID[i] = (x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue);
+ recChan[i] = 0;
+ recProt[i] = 0;
+ alert(i);
+
+ }
recProt[i] = 1;
}
+//end of testing5
if (ShowSubDir) {
MakeRecList2();
} else {
diff --git a/settings.js b/settings.js
index 22a9855..c502445 100644
--- a/settings.js
+++ b/settings.js
@@ -2,7 +2,7 @@
// Default settings
//
-var Version = "0.24.1"
+var Version = "0.24.2"
server_ip_array = new Array("http://192.168.1.15","http://192.168.3.15","http://192.168.3.100","http://192.168.178.19");
@@ -17,7 +17,10 @@ OSDLang = new Array ("English", "Nederlands");
langfile = new Array ("lang_eng.js", "lang_dut.js");
var testing2;
-var testing3;
+var testing3; // getmarks 1 = smarttvweb, 0 = restfulapi
+var testing4 = 1; // gettimersserver 1 = smarttvweb, 0 = restfulapi
+var testing5 = 1; // getrecordings 1 = smarttvweb, 2 = streamdev (not working yet)
+
var UseNewReclist = 1 ; //use new recordingslist function
var ShowSubDir = 1 ; // 0 = no, 1 = yes (default) // show seperate maps for subdirs in menu recordings