From 6e707c053cf7b943558df1899d02a904a85c616e Mon Sep 17 00:00:00 2001 From: "M. Voerman" Date: Wed, 16 Jan 2013 23:33:07 +0100 Subject: Recordings menu first try to show maps --- History | 1 + index.html | 135 +++++++++++++++++++++++++++++++++++++++++------------------- settings.js | 5 +++ 3 files changed, 98 insertions(+), 43 deletions(-) diff --git a/History b/History index 8a3e1bf..f2b5a5d 100644 --- a/History +++ b/History @@ -5,6 +5,7 @@ Added Menu INFO for IP/ DVR state Standby now stops the stream, getting back from standby reconnects to server & sets display Added initial support for MPD -> client plays stream from MPD-httpd + Recordings Menu now show maps. 0.10 Added sub Listinges for use as Radio list / Protected List / SD/HD list etc (Use for Multicast Channels keyword MultiCast in Serveradres) diff --git a/index.html b/index.html index c12ccc5..f4b53af 100644 --- a/index.html +++ b/index.html @@ -75,7 +75,7 @@ function onLoad() { osdepg.style.color = "white"; osdca.style.fontSize = fsCA; osdca.style.color = "black"; - switchtimer.style.color = "black"; + switchtimer.style.color = "white"; switchtimer.style.fontSize = fsEpg; osdepginfo.style.fontSize = fsEpginfo; osdepginfonext.style.fontSize = fsEpginfo; @@ -1610,11 +1610,6 @@ function onKeyMenu(keyCode) { break; case KEY_8: if (menu == 0) { - isSetupMenu = 0; - mediaList.style.opacity = 0.9; - mainmenu.style.opacity = 0; - getRecList2(); - LoadMediaSettings(); } if (menu == 1) { @@ -1847,6 +1842,16 @@ function UnloadMediaSettings() { function onKeyMedia(keyCode) { +if (DelisOK) { + switch(keyCode) { + case "Accept": + DelRec2(); + default: + switchtimer.style.opacity = 0; + DelisOK = 0; + break; + } +} else { switch(keyCode) { case "BrowserBack": if (mediaList.style.opacity == 0) { @@ -1861,23 +1866,26 @@ function onKeyMedia(keyCode) { break; case "Right": if (mediaList.style.opacity != 0) { - incMed(9); - do - { - incMed(1); - } - while (!recTitl[currMed]); + for (var i=0;i<10;i++) { + do + { + incMed(1); + } + while (!recTitl[currMed]); + } showMediaList(); } + break; case "Left": if (mediaList.style.opacity != 0) { - decMed(9); - do - { - decMed(1); - } - while (!recTitl[currMed]); + for (var i=0;i<10;i++) { + do + { + decMed(1); + } + while (!recTitl[currMed]); + } showMediaList(); } break; @@ -1909,13 +1917,17 @@ function onKeyMedia(keyCode) { break; case "Accept": if (mediaList.style.opacity != 0) { - mediaList.style.opacity = 0; - playRec(recLink[currMed]); + mediaList.style.opacity = 0; + playRec(recLink[currMed]); } else { osdmedia.style.opacity = 1 - osdmedia.style.opacity; ShowMediaOSD(); } break; + case "Red": + if (mediaList.style.opacity != 0) { + DelRec(); + } case "Green": audio = audio + 1; is = toi.informationService; @@ -2048,6 +2060,7 @@ function onKeyMedia(keyCode) { default: break; } + } } function getRecList() { @@ -2061,12 +2074,14 @@ try { for (var i=0;i"; // Recording Name + DelisOK = 1 + } catch(e) { + alert("Delete Recordings problem: " + e); + } +} + +function DelRec2() { +try { + xmlhttp=new XMLHttpRequest(); + xmlhttp.open("DELETE",(RestFulAPI + "/recordings/" + currMed ),false); + xmlhttp.send(); + alert(xmlhttp.responseText); + } catch(e) { + alert("Delete Recordings problem: " + e); + } } + +function MakeRecList() { + var x = ""; + for (var i=0;i RECORDINGS "; - listMed = currMed-7; - for(var i=currMed-7; i<=currMed+7; i++) { + listMed = currMed - 1; + if (nrMedia < 14) {var MaxMed = nrMedia; } else { var MaxMed = 14; } + + for(var i=currMed; i<=currMed + MaxMed; i++) { if (listMed<0) { - listMed=nrMedia-2; + listMed=nrMedia; } if (listMed>nrMedia-1) { listMed= -1; @@ -2109,13 +2158,13 @@ function showMediaList() { { listMed = listMed + 1; } - while (!recTitl[listMed] && (listMed\uE003\uE003" + Left(recTitl[listMed],60) + ""; + htmlstring = htmlstring + "\uE003\uE003" + Left(recList[listMed],60) + ""; } mediaList.innerHTML = htmlstring + "
"; } @@ -2329,8 +2378,6 @@ function onScheduledStop(event) {
-
- @@ -2356,6 +2403,8 @@ function onScheduledStop(event) {
+
+ diff --git a/settings.js b/settings.js index ac3c1eb..cb719a7 100644 --- a/settings.js +++ b/settings.js @@ -35,6 +35,7 @@ var minChan = new Array(); var maxChan = new Array(); var defChan = new Array(); // Server for Recordings var recServ = "http://192.168.3.15:8000"; +var RestFulAPI = "http://192.168.3.15:8002"; var MPDAddress = "http://192.168.3.15:8888"; // Radio channels.js Settings @@ -97,6 +98,7 @@ var channelsepglang = new Array(); var currMed = 0; var listMed = 0; +var DelisOK = 0; var menu = 0; var isMediaMenu = 0; @@ -211,6 +213,9 @@ var recLink = new Array(); var recDesc = new Array(); var recDura = new Array(); var recStrt = new Array(); +var recList = new Array(); +var recMap = 0; + var getRecOK = 0; var position = 0; -- cgit v1.2.3