diff options
-rw-r--r-- | History | 2 | ||||
-rw-r--r-- | channels4.js | 55 | ||||
-rw-r--r-- | index.html | 197 | ||||
-rw-r--r-- | settings.js | 2 |
4 files changed, 174 insertions, 82 deletions
@@ -16,6 +16,8 @@ VDR 1.7.29 / 2.1.1 Updated the resume function to work with the vdr 2.1.1 (changed to decimal ',') Added group 4, some Polish channels (NC+ sorting order) During play '0' jumps to 0:00:00 and now resets posmark index also to 0 + Sort the Recordingslist so no double maps are shown + Volume steps are 1, if volume < 10 0.22 Updated EPG filter for 42E, canal sat (tid 1088), canal+ (tid 1060), CDS (veronica, iConcerts, Animax) diff --git a/channels4.js b/channels4.js new file mode 100644 index 0000000..e57a15f --- /dev/null +++ b/channels4.js @@ -0,0 +1,55 @@ +// +// 4000 Polish Channels. +// + +minChan[4] = 4001; +defChan[4] = 4001; +baseChn[4] = 4000; +protChn[4] = 0; +maxChan[4] = 4050; // set to max channel else you see 'undefined' in guide view + +channelsnames[4001] = "TVN HD (S)"; +channels[4001] = "S13.0E-318-1600-15821"; +channelsnames[4002] = "TVN Siedem (S)"; +channels[4002] = "S13.0E-318-1000-4313"; +channelsnames[4003] = "TVN STYLE HD (S)"; +channels[4003] = "S13.0E-318-1600-15823"; +channelsnames[4004] = "TVN Turbo HD (S)"; +channels[4004] = "S13.0E-318-1600-15824"; +channelsnames[4005] = "TTV (S)"; +channels[4005] = "S13.0E-318-1000-4317"; +channelsnames[4006] = "TVN 24 HD (S)"; +channels[4006] = "S13.0E-318-1600-15826"; +channelsnames[4007] = "Polsat HD (S)"; +channels[4007] = "S13.0E-113-7800-3107"; +channelsnames[4011] = "TVP 1 HD (S)"; +channels[4011] = "S13.0E-318-1300-15037"; +channelsnames[4012] = "TVP 2 HD (S)"; +channels[4012] = "S13.0E-113-7800-3106"; +channelsnames[4013] = "TVP HD (S)"; +channels[4013] = "S13.0E-318-300-15202"; +channelsnames[4014] = "TVP Seriale (S)"; +channels[4014] = "S19.2E-1-1059-7108"; +channelsnames[4015] = "TVP INFO (S)"; +channels[4015] = "S19.2E-1-1059-7102"; +channelsnames[4016] = "TVP Kultura (S)"; +channels[4016] = "S19.2E-1-1059-7106"; +channelsnames[4017] = "TVP Polonia (S)"; +channels[4017] = "S19.2E-1-1059-7104"; +channelsnames[4018] = "TVP Historia (S)"; +channels[4018] = "S19.2E-1-1059-7105"; +channelsnames[4019] = "TV PULS (S)"; +channels[4019] = "S13.0E-318-1500-5112"; +channelsnames[4022] = "TVN CNBC (S)"; +channels[4022] = "S13.0E-318-1000-4322"; +channelsnames[4023] = "TVN Meteo (S)"; +channels[4023] = "S13.0E-318-1000-4318"; +channelsnames[4029] = "TVN 24 (S)"; +channels[4029] = "S13.0E-318-1000-4312"; +channelsnames[4048] = "Cinemax HD (S)"; +channels[4048] = "S13.0E-318-300-15207"; +channelsnames[4049] = "Cinemax 2 HD (S)"; +channels[4049] = "S13.0E-113-7800-3110"; +channelsnames[4050] = "HBO HD (S)"; +channels[4050] = "S13.0E-113-7800-3105"; + @@ -309,6 +309,44 @@ function decChan(step) { OSDchannr(currChan); } +function VolumeUp() { + if (Volume < 10) { + var VolStep = 1; + } else { + var VolStep = VolumeStep; + } + + Volume = Volume + VolStep; + if (Volume > 100) { + Volume = 100; + } + toi.audioOutputService.setVolume(AudioOut, Volume); + showVolume(); +} + +function VolumeDown() { + if (Volume > 10) { + var VolStep = VolumeStep; + } else { + var VolStep = 1; + } + + Volume = Volume - VolStep; + if (Volume < 0) { + Volume = 0; + } + toi.audioOutputService.setVolume(AudioOut, Volume); + showVolume(); +} + + +function VolumeMute() { + state = toi.audioOutputService.getMuteState(AudioOut); + toi.audioOutputService.setMuteState(AudioOut, !state); + mute = 1 - state; + osdmute.style.opacity = mute; +} + function createPlayer() { try { mediaPlayer = toi.mediaService.createPlayerInstance(); @@ -961,26 +999,13 @@ function onKeyDown(event) { } break; case "VolumeMute": - state = toi.audioOutputService.getMuteState(AudioOut); - toi.audioOutputService.setMuteState(AudioOut, !state); - mute = 1 - state; - osdmute.style.opacity = mute; + VolumeMute(); break; case "VolumeUp": - Volume = Volume + VolumeStep; - if (Volume > 100) { - Volume = 100; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeUp(); break; case "VolumeDown": - Volume = Volume - VolumeStep; - if (Volume < 0) { - Volume = 0; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeDown(); break; case "MediaRewind": @@ -2208,6 +2233,8 @@ function onKeyMenu(keyCode) { InitMenu(menu); break; case "Teletext": + UseNewReclist = 1 - UseNewReclist; + alert(UseNewReclist); break; case "TV": break; @@ -2413,24 +2440,13 @@ function onKeyMenu(keyCode) { } break; case "VolumeMute": - state = toi.audioOutputService.getMuteState(AudioOut); - toi.audioOutputService.setMuteState(AudioOut, !state); - mute = 1 - state; - osdmute.style.opacity = mute; + VolumeMute(); break; case "VolumeUp": - Volume = Volume + VolumeStep; - if (Volume > 100) { - Volume = 100; - } - toi.audioOutputService.setVolume(AudioOut, Volume); + VolumeUp(); break; case "VolumeDown": - Volume = Volume - VolumeStep; - if (Volume < 0) { - Volume = 0; - } - toi.audioOutputService.setVolume(AudioOut, Volume); + VolumeDown(); break; default: @@ -3084,26 +3100,13 @@ if (DelisOK) { break; case "VolumeMute": - state = toi.audioOutputService.getMuteState(AudioOut); - toi.audioOutputService.setMuteState(AudioOut, !state); - mute = 1 - state; - osdmute.style.opacity = mute; + VolumeMute(); break; case "VolumeUp": - Volume = Volume + VolumeStep; - if (Volume > 100) { - Volume = 100; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeUp(); break; case "VolumeDown": - Volume = Volume - VolumeStep; - if (Volume < 0) { - Volume = 0; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeDown(); break; case KEY_REC: @@ -3189,26 +3192,13 @@ if (DelisOK) { break; case "VolumeMute": - state = toi.audioOutputService.getMuteState(AudioOut); - toi.audioOutputService.setMuteState(AudioOut, !state); - mute = 1 - state; - osdmute.style.opacity = mute; + VolumeMute(); break; case "VolumeUp": - Volume = Volume + VolumeStep; - if (Volume > 100) { - Volume = 100; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeUp() break; case "VolumeDown": - Volume = Volume - VolumeStep; - if (Volume < 0) { - Volume = 0; - } - toi.audioOutputService.setVolume(AudioOut, Volume); - showVolume(); + VolumeDown(); break; @@ -3347,30 +3337,73 @@ try { xmlDoc=xmlhttp.responseXML; var x=xmlDoc.getElementsByTagName("item"); nrMedia = x.length - 1; + +if (UseNewReclist && recPath == "/recordings.xml") { 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. - } + 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); + rec_lst[i][0] = rec_lst[i][0].split("~"); + rec_lst[i][1] = (x[i].getElementsByTagName("enclosure")[0].getAttribute('url')); + rec_lst[i][2] = (x[i].getElementsByTagName("description")[0].childNodes[0].nodeValue); + rec_lst[i][3] = (x[i].getElementsByTagName("duration")[0].childNodes[0].nodeValue); + rec_lst[i][4] = (x[i].getElementsByTagName("start")[0].childNodes[0].nodeValue); + rec_lst[i][5] = (x[i].getElementsByTagName("isnew")[0].childNodes[0].nodeValue); + rec_lst[i][6] = (x[i].getElementsByTagName("guid")[0].childNodes[0].nodeValue); + //Get channel number from recordings, shows right names only if server & client use same channel order + recDummy = rec_lst[i][6].split("."); + recDummy = recDummy[(recDummy.length-2)].split("-"); + rec_lst[i][7] = recDummy[0] + "\uE003-\uE003" + channelsnames[(recDummy[0])]; + rec_lst[i][8] = protChn[Number(Left((recDummy[0] / 1000),1))]; + } + //Get channel number from recordings + rec_lst.sort(); + for (var x=0;x<i;x++) { + recTitl[x] = rec_lst[x][0]; + recLink[x] = rec_lst[x][1]; + recDesc[x] = rec_lst[x][2]; + recDura[x] = rec_lst[x][3]; + recStrt[x] = rec_lst[x][4]; + rec_New[x] = rec_lst[x][5]; + recGUID[x] = rec_lst[x][6]; + recChan[x] = rec_lst[x][7]; + recProt[x] = rec_lst[x][8]; + } + + + + } else { + +// old recordings list function + + 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) recTitl[i] = "fake"; recGroup[i] = 0; diff --git a/settings.js b/settings.js index b60aa9f..ad3d6d9 100644 --- a/settings.js +++ b/settings.js @@ -15,6 +15,7 @@ OSDLang = new Array ("English", "Nederlands"); langfile = new Array ("lang_eng.js", "lang_dut.js"); var testing2; +var UseNewReclist = 1 ; //use new recordingslist function var ShowSubDir = 1 ; // 0 = no, 1 = yes (default) // show seperate maps for subdirs in menu recordings var showClock = 0; // 0 = no, 1 = yes @@ -250,6 +251,7 @@ var xx = 0; var isRecording = 0; // set by recording subroutine var subsmode = 0; // "cfg.media.subtitling.modepriority","Teletext,DVB" +var rec_lst = new Array(); // Full recording list, used for sorting var recTitl = new Array(); // title of recording var recLink = new Array(); // link to get recording var recDesc = new Array(); // description of the recording |