summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--History2
-rw-r--r--channels.js2666
-rw-r--r--index.html5154
-rw-r--r--main.js5161
-rw-r--r--settings.js10
5 files changed, 6479 insertions, 6514 deletions
diff --git a/History b/History
index 748e3e6..7383e29 100644
--- a/History
+++ b/History
@@ -9,6 +9,8 @@ VDR 1.7.29+
Updated remote keys in settings file.
Added parameter to script, if set script uses 'svdrpsend.pl', if not 'svdrpsend'
Fixed show ext epg info if ext info != short info.
+ Moved script to main.js
+ Display shows R/F + channelnumber ('R' for Radio, 'F' for favorite)
0.25 Get recordings from Streamdev, Restfulapi or SmartTVweb.
diff --git a/channels.js b/channels.js
index cfd6ef6..d7e13fc 100644
--- a/channels.js
+++ b/channels.js
@@ -16,7 +16,7 @@ channelsnames[8]="Veronica/DisneyXD HD";
channels[8]="S23.5E-3-3225-21035";
channelsnames[9]="NET5 HD";
channels[9]="S23.5E-3-3225-21020";
-channelsnames[10]="BVN";
+channelsnames[10]="BVN TV";
channels[10]="S19.2E-1-1048-4320";
channelsnames[11]="RTL8 HD";
channels[11]="S23.5E-3-3208-7036";
@@ -58,12 +58,10 @@ channelsnames[29]="Discovery HD CZ";
channels[29]="S23.5E-3-3208-7011";
channelsnames[30]="MOTORS TV";
channels[30]="S19.2E-1-1110-9509";
-channelsnames[31]="NAUTICAL CHANNEL";
-channels[31]="S19.2E-1-1096-8607";
-channelsnames[32]="Discovery Channel";
-channels[32]="S23.5E-3-3211-20833";
-channelsnames[33]="Nat Geo Wild HD DUT";
-channels[33]="S23.5E-3-3226-709";
+channelsnames[31]="Discovery Channel";
+channels[31]="S23.5E-3-3211-20833";
+channelsnames[32]="Nat Geo Wild HD DUT";
+channels[32]="S23.5E-3-3226-709";
channelsnames[50]="DMAX";
channels[50]="S19.2E-133-33-63";
channelsnames[51]="Discovery";
@@ -156,7 +154,7 @@ channelsnames[107]="Sky DramaRom";
channels[107]="S28.2E-2-2007-5502";
channelsnames[108]="Sky ScFi/Horror";
channels[108]="S28.2E-2-2007-4304";
-channelsnames[109]="Sky Greats";
+channelsnames[109]="Sky Superhero";
channels[109]="S28.2E-2-2007-5650";
channelsnames[110]="Sky Select";
channels[110]="S28.2E-2-2007-4306";
@@ -198,7 +196,7 @@ channelsnames[137]="Film+ CZ";
channels[137]="S23.5E-3-3211-20863";
channelsnames[138]="MGM";
channels[138]="S23.5E-3-3210-5072";
-channelsnames[150]="RTL Crime,RTLCrime";
+channelsnames[150]="RTL Crime";
channels[150]="S19.2E-133-1-27";
channelsnames[151]="RTLNITRO";
channels[151]="S19.2E-1-1089-12061";
@@ -334,13 +332,13 @@ channelsnames[250]="True Drama";
channels[250]="S28.2E-2-2314-53380";
channelsnames[251]="True Ent";
channels[251]="S28.2E-2-2314-53375";
-channelsnames[252]="True Movies 1";
+channelsnames[252]="True Christmas";
channels[252]="S28.2E-2-2314-53320";
channelsnames[253]="True Movies 2";
channels[253]="S28.2E-2-2314-53325";
channelsnames[254]="RTE One";
channels[254]="S28.2E-2-2043-9601";
-channelsnames[255]="RTE TWO";
+channelsnames[255]="RTE2";
channels[255]="S28.2E-2-2043-9602";
channelsnames[256]="Setanta Ireland";
channels[256]="S28.2E-2-2081-51111";
@@ -407,7 +405,7 @@ channels[288]="S28.2E-2-2601-54051";
channelsnames[289]="Horse & Country";
channels[289]="S28.2E-2-2076-54140";
channelsnames[300]="CBBC";
-channels[300]="S28.2E-2-2045-6370";
+channels[300]="S28.2E-2-2048-10352";
channelsnames[301]="CBeebies";
channels[301]="S28.2E-2-2045-6318";
channelsnames[302]="CITV";
@@ -416,7 +414,7 @@ channelsnames[303]="KiKA";
channels[303]="S19.2E-1-1079-28008";
channelsnames[304]="RiC";
channels[304]="S19.2E-1-1117-13019";
-channelsnames[305]="NICK/COMEDY";
+channelsnames[305]="Nickelodeon";
channels[305]="S19.2E-1-1078-28680";
channelsnames[306]="Tiny Pop";
channels[306]="S28.2E-2-2314-53330";
@@ -430,7 +428,7 @@ channelsnames[310]="PopGirl";
channels[310]="S28.2E-2-2314-53360";
channelsnames[311]="POP+1";
channels[311]="S28.2E-2-2314-53370";
-channelsnames[312]="NICK/CC AUT";
+channelsnames[312]="NICKELODEON AT";
channels[312]="S19.2E-133-7-61";
channelsnames[313]="Baby TV";
channels[313]="S13.0E-318-11500-17309";
@@ -444,7 +442,7 @@ channelsnames[317]="Nick Jr.";
channels[317]="S28.2E-2-2029-5563";
channelsnames[318]="Nick Jr+1";
channels[318]="S28.2E-2-2079-51090";
-channelsnames[319]="Nick Jr. 2";
+channelsnames[319]="Nick Jr Peppa";
channels[319]="S28.2E-2-2079-51089";
channelsnames[320]="Nick Jr France";
channels[320]="S19.2E-1-1078-28677";
@@ -459,9 +457,9 @@ channels[324]="S28.2E-2-2029-5561";
channelsnames[325]="DISNEY JR";
channels[325]="S30.0W-49-4-71";
channelsnames[326]="Disney Junior";
-channels[326]="S28.2E-2-2051-9004";
+channels[326]="S28.2E-2-2011-9103";
channelsnames[327]="Disney Junior+";
-channels[327]="S28.2E-2-2051-9010";
+channels[327]="S28.2E-2-2011-9106";
channelsnames[328]="BabyTV";
channels[328]="S28.2E-2-2029-5564";
channelsnames[329]="Boomerang";
@@ -475,37 +473,33 @@ channels[332]="S28.2E-2-2021-5521";
channelsnames[333]="CN+1";
channels[333]="S28.2E-2-2074-50215";
channelsnames[334]="Disney Chnl";
-channels[334]="S28.2E-2-2051-9001";
+channels[334]="S28.2E-2-2011-9102";
channelsnames[335]="Disney Chnl+1";
-channels[335]="S28.2E-2-2051-9007";
-channelsnames[336]="Disney Cine";
-channels[336]="S28.2E-2-2051-9002";
-channelsnames[337]="Disney Cine+1";
-channels[337]="S28.2E-2-2051-9003";
-channelsnames[338]="Disney XD";
-channels[338]="S28.2E-2-2051-9011";
-channelsnames[339]="Disney XD+1";
-channels[339]="S28.2E-2-2051-9008";
-channelsnames[340]="Nicktoons";
-channels[340]="S28.2E-2-2029-5562";
-channelsnames[341]="NICK JR";
-channels[341]="S30.0W-49-7-75";
-channelsnames[342]="Boomerang";
-channels[342]="S23.5E-3-3202-6035";
-channelsnames[343]="Disney Channel";
-channels[343]="S23.5E-3-3202-6065";
-channelsnames[344]="Cartoon";
-channels[344]="S23.5E-3-3222-20940";
-channelsnames[345]="JimJam";
-channels[345]="S23.5E-3-3202-6003";
-channelsnames[346]="JimJam CZ";
-channels[346]="S23.5E-3-3202-6053";
-channelsnames[347]="Disney CZ";
-channels[347]="S23.5E-3-3211-20857";
-channelsnames[348]="KetOp12";
-channels[348]="S23.5E-3-3222-21112";
-channelsnames[349]="VTMKazoom/Kanaal Z";
-channels[349]="S23.5E-3-3222-21116";
+channels[335]="S28.2E-2-2011-9105";
+channelsnames[336]="Disney XD";
+channels[336]="S28.2E-2-2011-9101";
+channelsnames[337]="Disney XD+1";
+channels[337]="S28.2E-2-2011-9104";
+channelsnames[338]="Nicktoons";
+channels[338]="S28.2E-2-2029-5562";
+channelsnames[339]="NICK JR";
+channels[339]="S30.0W-49-7-75";
+channelsnames[340]="Boomerang";
+channels[340]="S23.5E-3-3202-6035";
+channelsnames[341]="Disney Channel";
+channels[341]="S23.5E-3-3202-6065";
+channelsnames[342]="Cartoon";
+channels[342]="S23.5E-3-3222-20940";
+channelsnames[343]="JimJam";
+channels[343]="S23.5E-3-3202-6003";
+channelsnames[344]="JimJam CZ";
+channels[344]="S23.5E-3-3202-6053";
+channelsnames[345]="Disney CZ";
+channels[345]="S23.5E-3-3211-20857";
+channelsnames[346]="KetOp12";
+channels[346]="S23.5E-3-3222-21112";
+channelsnames[347]="VTMKazoom/Kanaal Z";
+channels[347]="S23.5E-3-3222-21116";
channelsnames[401]="Das Erste";
channels[401]="S19.2E-1-1101-28106";
channelsnames[402]="ZDF";
@@ -576,13 +570,13 @@ channelsnames[434]="Disney Channel";
channels[434]="S19.2E-133-5-1793";
channelsnames[450]="13th Street,13Street";
channels[450]="S19.2E-133-1-42";
-channelsnames[451]="AXN Action.,AXN.";
+channelsnames[451]="AXN Action. OBSOLETE,AXN.";
channels[451]="S19.2E-133-9-62";
-channelsnames[452]="Biography Channel.,Bio.";
+channelsnames[452]="Biography Channel. OBSOLETE,Bio.";
channels[452]="S19.2E-133-9-67";
-channelsnames[453]="Boomerang.";
+channelsnames[453]="Boomerang. OBSOLETE";
channels[453]="S19.2E-133-9-66";
-channelsnames[454]="Cartoon Network (S).";
+channelsnames[454]="Cartoon Network (S). OBSOLETE";
channels[454]="S19.2E-133-9-64";
channelsnames[455]="Classica";
channels[455]="S19.2E-133-17-24";
@@ -594,7 +588,7 @@ channelsnames[458]="Disney Cinemagic,DisneyCin";
channels[458]="S19.2E-133-3-25";
channelsnames[459]="Disney XD,DisneyXD";
channels[459]="S19.2E-133-17-28";
-channelsnames[460]="Eurosport 2 Deutschland.";
+channelsnames[460]="Eurosport 2 Deutschland. OBSOLETE";
channels[460]="S19.2E-133-9-65";
channelsnames[461]="Fox Serie,Fox";
channels[461]="S19.2E-133-1-16";
@@ -602,11 +596,11 @@ channelsnames[462]="Goldstar TV,Goldstar";
channels[462]="S19.2E-133-17-518";
channelsnames[463]="Heimatkanal,Heimat";
channels[463]="S19.2E-133-17-22";
-channelsnames[464]="History.";
+channelsnames[464]="History. OBSOLETE";
channels[464]="S19.2E-133-9-68";
channelsnames[465]="Junior";
channels[465]="S19.2E-133-17-19";
-channelsnames[466]="Kinowelt TV.,Kinowelt.";
+channelsnames[466]="Kinowelt TV. OBSOLETE,Kinowelt.";
channels[466]="S19.2E-133-9-60";
channelsnames[467]="MGM";
channels[467]="S19.2E-133-3-515";
@@ -618,7 +612,7 @@ channelsnames[470]="National Geographic,NatGeo";
channels[470]="S19.2E-133-4-13";
channelsnames[471]="Disney Junior,DisneyJr";
channels[471]="S19.2E-133-17-26";
-channelsnames[472]="Romance TV.,Romance.";
+channelsnames[472]="Romance TV. OBSOLETE,Romance.";
channels[472]="S19.2E-133-9-63";
channelsnames[473]="RTL Passion,Passion";
channels[473]="S19.2E-133-1-29";
@@ -626,9 +620,9 @@ channelsnames[474]="Sky Action,Action";
channels[474]="S19.2E-133-2-9";
channelsnames[475]="Sky Bundesliga 1,Sky Buli 1";
channels[475]="S19.2E-133-4-223";
-channelsnames[476]="Sky Cinema +1,Cinema1";
+channelsnames[476]="Sky Cinema+1,SkyCine1";
channels[476]="S19.2E-133-2-11";
-channelsnames[477]="Sky Cinema +24,Cinema24";
+channelsnames[477]="Sky Cinema+24,SkyCine24";
channels[477]="S19.2E-133-2-43";
channelsnames[478]="Sky Hits,SkyHits";
channels[478]="S19.2E-133-3-41";
@@ -644,17 +638,17 @@ channelsnames[483]="Sky Nostalgie,Nostalgie";
channels[483]="S19.2E-133-3-516";
channelsnames[484]="Sky Sport 1,Sport1";
channels[484]="S19.2E-133-4-221";
-channelsnames[485]="LEV - KOP";
+channelsnames[485]="Sky Sport 2,Sport2";
channels[485]="S19.2E-133-4-222";
channelsnames[486]="N24 Austria";
channels[486]="S19.2E-133-7-53";
channelsnames[487]="Spiegel Geschichte,SpiegelG";
channels[487]="S19.2E-133-4-52";
-channelsnames[488]="sportdigital.";
+channelsnames[488]="sportdigital. OBSOLETE";
channels[488]="S19.2E-133-9-69";
channelsnames[489]="Syfy";
channels[489]="S19.2E-133-17-36";
-channelsnames[490]="TNT Film (TCM).,TNT Film.";
+channelsnames[490]="TNT Film (TCM). OBSOLETE,TNT Film.";
channels[490]="S19.2E-133-9-61";
channelsnames[491]="TNT Serie,TNTSerie";
channels[491]="S19.2E-133-1-50";
@@ -714,82 +708,66 @@ channelsnames[551]="Rai Sport 1";
channels[551]="S13.0E-318-5400-3305";
channelsnames[552]="Rai Sport 2";
channels[552]="S13.0E-318-5400-3301";
-channelsnames[553]="Saudi Sports 1";
-channels[553]="S13.0E-318-6500-498";
-channelsnames[554]="Saudi Sport 2";
-channels[554]="S13.0E-318-7700-103";
-channelsnames[555]="Saudi Arabian TV2";
-channels[555]="S13.0E-318-7700-112";
-channelsnames[556]="JSC Sports Global";
-channels[556]="S13.0E-318-7700-126";
-channelsnames[557]="Eurosport Deutschland";
-channels[557]="S19.2E-1-1091-31200";
-channelsnames[558]="e8 television,e8 tv";
-channels[558]="S19.2E-133-33-897";
-channelsnames[559]="SPORT1";
-channels[559]="S19.2E-133-33-900";
-channelsnames[560]="Test CH 1";
-channels[560]="S13.0E-318-500-8437";
-channelsnames[561]="Test CH 2";
-channels[561]="S13.0E-318-500-8438";
-channelsnames[562]="Test CH 3";
-channels[562]="S13.0E-318-500-8439";
-channelsnames[563]="Test CH 4";
-channels[563]="S13.0E-318-500-8440";
-channelsnames[564]="beIN SPORTS News";
-channels[564]="S13.0E-318-500-8441";
-channelsnames[565]="beIN SPORTS Global";
-channels[565]="S13.0E-318-500-8442";
-channelsnames[566]="Eurosport";
-channels[566]="S28.2E-2-2030-6039";
-channelsnames[567]="Eurosport 2";
-channels[567]="S28.2E-2-2023-5009";
-channelsnames[568]="Extreme Sports";
-channels[568]="S28.2E-2-2311-52080";
-channelsnames[569]="Premier Sports";
-channels[569]="S28.2E-2-2081-51113";
-channelsnames[570]="Sky Sports 1";
-channels[570]="S28.2E-2-2021-4214";
-channelsnames[571]="Sky Sports 2";
-channels[571]="S28.2E-2-2021-4208";
-channelsnames[572]="Sky Sports 3";
-channels[572]="S28.2E-2-2021-4219";
-channelsnames[573]="Sky Sports 4";
-channels[573]="S28.2E-2-2023-5401";
-channelsnames[574]="Sky Sp NewsHQ";
-channels[574]="S28.2E-2-2023-4907";
-channelsnames[575]="CANAL+ SPORT";
-channels[575]="S19.2E-1-1072-8224";
-channelsnames[576]="ESP Int'l";
-channels[576]="S13.0E-318-200-13831";
-channelsnames[577]="ESP Dutch";
-channels[577]="S13.0E-318-200-13833";
-channelsnames[578]="ESP2 Int'l";
-channels[578]="S13.0E-318-200-13801";
-channelsnames[579]="Sky Sport News,SportNews";
-channels[579]="S19.2E-133-3-17";
-channelsnames[580]="EUROSPORT";
-channels[580]="S19.2E-53-1097-2025";
-channelsnames[581]="Eurosport DUT";
-channels[581]="S23.5E-3-3209-13106";
-channelsnames[582]="FOX Sports EDL 1 HD";
-channels[582]="S23.5E-3-3202-6092";
-channelsnames[583]="FOX Sports 2 HD int";
-channels[583]="S23.5E-3-3225-21045";
-channelsnames[584]="FOX Sports EDL 3";
-channels[584]="S23.5E-3-3222-20935";
-channelsnames[585]="Sport1 SELECT HD";
-channels[585]="S23.5E-3-3222-20960";
-channelsnames[586]="Sport1 Voetbal";
-channels[586]="S23.5E-3-3222-20925";
-channelsnames[587]="Sport1 Golf";
-channels[587]="S23.5E-3-3222-20930";
-channelsnames[588]="HBO HD";
-channels[588]="S23.5E-3-3205-5033";
-channelsnames[589]="Eurosport";
-channels[589]="S23.5E-3-3211-20809";
-channelsnames[590]="Eurosport CZ";
-channels[590]="S23.5E-3-3211-20859";
+channelsnames[553]="Saudi Arabian TV2";
+channels[553]="S13.0E-318-7700-112";
+channelsnames[554]="JSC Sports Global";
+channels[554]="S13.0E-318-7700-126";
+channelsnames[555]="Eurosport Deutschland";
+channels[555]="S19.2E-1-1091-31200";
+channelsnames[556]="e8 television,e8 tv";
+channels[556]="S19.2E-133-33-897";
+channelsnames[557]="SPORT1";
+channels[557]="S19.2E-133-33-900";
+channelsnames[558]="Eurosport";
+channels[558]="S28.2E-2-2030-6039";
+channelsnames[559]="Eurosport 2";
+channels[559]="S28.2E-2-2023-5009";
+channelsnames[560]="Extreme Sports";
+channels[560]="S28.2E-2-2311-52080";
+channelsnames[561]="Premier Sports";
+channels[561]="S28.2E-2-2081-51113";
+channelsnames[562]="Sky Sports 1";
+channels[562]="S28.2E-2-2021-4214";
+channelsnames[563]="Sky Sports 2";
+channels[563]="S28.2E-2-2021-4208";
+channelsnames[564]="Sky Sports 3";
+channels[564]="S28.2E-2-2021-4219";
+channelsnames[565]="Sky Ryder Cup";
+channels[565]="S28.2E-2-2023-5401";
+channelsnames[566]="Sky Sp NewsHQ";
+channels[566]="S28.2E-2-2023-4907";
+channelsnames[567]="CANAL+ SPORT";
+channels[567]="S19.2E-1-1072-8224";
+channelsnames[568]="ESP Int'l";
+channels[568]="S13.0E-318-200-13831";
+channelsnames[569]="ESP Dutch";
+channels[569]="S13.0E-318-200-13833";
+channelsnames[570]="ESP2 Int'l";
+channels[570]="S13.0E-318-200-13801";
+channelsnames[571]="Sky Sport News,SportNews";
+channels[571]="S19.2E-133-3-17";
+channelsnames[572]="EUROSPORT";
+channels[572]="S19.2E-53-1097-2025";
+channelsnames[573]="Eurosport DUT";
+channels[573]="S23.5E-3-3209-13106";
+channelsnames[574]="FOX Sports EDL 1 HD";
+channels[574]="S23.5E-3-3202-6092";
+channelsnames[575]="FOX Sports 2 HD int";
+channels[575]="S23.5E-3-3225-21045";
+channelsnames[576]="FOX Sports EDL 3";
+channels[576]="S23.5E-3-3222-20935";
+channelsnames[577]="Sport1 Select HD";
+channels[577]="S23.5E-3-3222-20960";
+channelsnames[578]="Sport1 Voetbal";
+channels[578]="S23.5E-3-3222-20925";
+channelsnames[579]="Sport1 Golf";
+channels[579]="S23.5E-3-3222-20930";
+channelsnames[580]="HBO HD";
+channels[580]="S23.5E-3-3205-5033";
+channelsnames[581]="Eurosport";
+channels[581]="S23.5E-3-3211-20809";
+channelsnames[582]="Eurosport CZ";
+channels[582]="S23.5E-3-3211-20859";
channelsnames[600]="DELUXE MUSIC,DELUXE";
channels[600]="S19.2E-133-7-65";
channelsnames[601]="Vintage TV";
@@ -856,13 +834,13 @@ channelsnames[631]="MTV ROCKS.";
channels[631]="S19.2E-1-1066-28669";
channelsnames[632]="MTV FRANCE";
channels[632]="S19.2E-1-1066-28652";
-channelsnames[633]="MTV IDOL";
+channelsnames[633]="Test Channel 3 (Ex MTV IDOL)";
channels[633]="S19.2E-1-1078-28675";
-channelsnames[634]="MTV PULSE";
+channelsnames[634]="Test Channel 2 (ex MTV Pulse)";
channels[634]="S19.2E-1-1078-28674";
-channelsnames[635]="MTV Germany";
+channelsnames[635]="Test Channel 1 (ex MTV Germany)";
channels[635]="S19.2E-1-1078-28673";
-channelsnames[636]="VIVA Germany";
+channelsnames[636]="Comedy Central/VIVA";
channels[636]="S19.2E-1-1078-28676";
channelsnames[637]="MTV BASE FRANCE";
channels[637]="S19.2E-1-1066-28661";
@@ -906,7 +884,7 @@ channelsnames[656]="TVE Internacional";
channels[656]="S30.0W-54-37-967";
channelsnames[657]="MTV ROCKS";
channels[657]="S30.0W-54-37-2004";
-channelsnames[658]="VIVA AUT";
+channelsnames[658]="Comedy Central / VIVA AT";
channels[658]="S19.2E-133-7-60";
channelsnames[659]="MTV Live";
channels[659]="S28.2E-2-2409-50885";
@@ -970,7 +948,7 @@ channelsnames[735]="Sangat";
channels[735]="S28.2E-2-2612-9536";
channelsnames[736]="MATV National";
channels[736]="S28.2E-2-2604-54300";
-channelsnames[737]="53290";
+channelsnames[737]="BON TV";
channels[737]="S28.2E-2-2313-53290";
channelsnames[738]="ARY QTV";
channels[738]="S28.2E-2-2306-52535";
@@ -1014,40 +992,38 @@ channelsnames[757]="Zee Punjabi";
channels[757]="S28.2E-2-2405-50475";
channelsnames[758]="Face 1";
channels[758]="S13.0E-318-15700-10605";
-channelsnames[759]="Demo";
-channels[759]="S13.0E-318-15700-10604";
-channelsnames[760]="GEO TEZ";
-channels[760]="S28.2E-2-2306-52505";
-channelsnames[761]="ARY Ent";
-channels[761]="S28.2E-2-2405-50415";
-channelsnames[762]="GEO News";
-channels[762]="S28.2E-2-2405-50405";
-channelsnames[763]="GEO UK";
-channels[763]="S28.2E-2-2306-52500";
-channelsnames[800]="1TVRUS Europe";
-channels[800]="S13.0E-318-9400-8208";
-channelsnames[801]="RTR";
-channels[801]="S13.0E-318-12600-1708";
-channelsnames[802]="Jewish News One";
-channels[802]="S13.0E-318-12600-1703";
-channelsnames[803]="Rossiya 24";
-channels[803]="S13.0E-318-12600-1710";
-channelsnames[804]="Arise TV";
-channels[804]="S13.0E-318-15400-13527";
-channelsnames[805]="Soyuz TV";
-channels[805]="S13.0E-318-11500-17313";
-channelsnames[806]="RBC-TV";
-channels[806]="S13.0E-318-9000-8342";
-channelsnames[807]="RT DOC";
-channels[807]="S13.0E-318-6500-487";
-channelsnames[808]="PIK TV OBSOLETE";
-channels[808]="S13.0E-318-6500-440";
-channelsnames[809]="R1";
-channels[809]="S13.0E-318-13000-14607";
-channelsnames[810]="TVRUS";
-channels[810]="S13.0E-318-15500-637";
-channelsnames[811]="Music Box Russia";
-channels[811]="S13.0E-318-15700-10630";
+channelsnames[759]="GEO TEZ";
+channels[759]="S28.2E-2-2306-52505";
+channelsnames[760]="ARY Ent";
+channels[760]="S28.2E-2-2405-50415";
+channelsnames[761]="GEO News";
+channels[761]="S28.2E-2-2405-50405";
+channelsnames[762]="GEO UK";
+channels[762]="S28.2E-2-2306-52500";
+channelsnames[800]="Music Box Russia";
+channels[800]="S13.0E-318-11500-17316";
+channelsnames[801]="RUTV";
+channels[801]="S13.0E-318-600-17680";
+channelsnames[802]="1TVRUS Europe";
+channels[802]="S13.0E-318-9400-8208";
+channelsnames[803]="RTR";
+channels[803]="S13.0E-318-12600-1708";
+channelsnames[804]="THT COMEDY";
+channels[804]="S13.0E-318-12600-1703";
+channelsnames[805]="Rossiya 24";
+channels[805]="S13.0E-318-12600-1710";
+channelsnames[806]="Arise TV";
+channels[806]="S13.0E-318-15400-13527";
+channelsnames[807]="Soyuz TV";
+channels[807]="S13.0E-318-11500-17313";
+channelsnames[808]="RBC-TV";
+channels[808]="S13.0E-318-9000-8342";
+channelsnames[809]="RT DOC";
+channels[809]="S13.0E-318-6500-487";
+channelsnames[810]="R1";
+channels[810]="S13.0E-318-13000-14607";
+channelsnames[811]="TVRUS";
+channels[811]="S13.0E-318-15500-637";
channelsnames[812]="Shanson TV";
channels[812]="S13.0E-318-12600-1704";
channelsnames[813]="ChildRussia";
@@ -1074,20 +1050,14 @@ channelsnames[823]="ESP Russian";
channels[823]="S13.0E-318-200-13835";
channelsnames[824]="ESP2 NE Russian";
channels[824]="S13.0E-318-200-13883";
-channelsnames[825]="A-24 TV OBSOLETE";
-channels[825]="S13.0E-318-15600-10713";
-channelsnames[826]="Khabar TV";
-channels[826]="S13.0E-318-7200-7220";
-channelsnames[827]="inteRTV Mir Seriala";
-channels[827]="S13.0E-318-8100-14807";
-channelsnames[828]="ARM_1";
-channels[828]="S13.0E-318-9400-8202";
-channelsnames[829]="SHANT TV";
-channels[829]="S13.0E-318-12600-1707";
-channelsnames[830]="TV Verdade";
-channels[830]="S13.0E-318-11500-17338";
-channelsnames[831]="TV9";
-channels[831]="S13.0E-318-15400-13505";
+channelsnames[825]="Khabar TV";
+channels[825]="S13.0E-318-7200-7220";
+channelsnames[826]="inteRTV Mir Seriala";
+channels[826]="S13.0E-318-8100-14807";
+channelsnames[827]="ARM_1";
+channels[827]="S13.0E-318-9400-8202";
+channelsnames[828]="TV9";
+channels[828]="S13.0E-318-15400-13505";
channelsnames[840]="TVP1";
channels[840]="S19.2E-1-1059-7100";
channelsnames[841]="TVP2";
@@ -1140,26 +1110,24 @@ channelsnames[918]="France 24 (en Francais)";
channels[918]="S13.0E-318-200-13849";
channelsnames[919]="Canal 24 Horas";
channels[919]="S13.0E-318-5000-13712";
-channelsnames[920]="Press TV OBSOLETE";
-channels[920]="S13.0E-318-6500-480";
-channelsnames[921]="Chamber TV";
-channels[921]="S23.5E-3-3224-5220";
-channelsnames[922]="Sky News";
-channels[922]="S28.2E-2-2026-4704";
-channelsnames[923]="Bloomberg";
-channels[923]="S28.2E-2-2306-52550";
-channelsnames[924]="ABN TV";
-channels[924]="S28.2E-2-2301-52111";
-channelsnames[925]="CNN";
-channels[925]="S28.2E-2-2074-50220";
-channelsnames[926]="RT";
-channels[926]="S28.2E-2-2409-50847";
-channelsnames[927]="Al Jazeera Eng";
-channels[927]="S28.2E-2-2081-51107";
-channelsnames[928]="Russia Today";
-channels[928]="S19.2E-1-1022-6904";
-channelsnames[929]="RT Esp";
-channels[929]="S19.2E-1-1020-7013";
+channelsnames[920]="Chamber TV";
+channels[920]="S23.5E-3-3224-5220";
+channelsnames[921]="Sky News";
+channels[921]="S28.2E-2-2026-4704";
+channelsnames[922]="Bloomberg";
+channels[922]="S28.2E-2-2306-52550";
+channelsnames[923]="ABN TV";
+channels[923]="S28.2E-2-2301-52111";
+channelsnames[924]="CNN";
+channels[924]="S28.2E-2-2074-50220";
+channelsnames[925]="RT";
+channels[925]="S28.2E-2-2409-50847";
+channelsnames[926]="Al Jazeera Eng";
+channels[926]="S28.2E-2-2081-51107";
+channelsnames[927]="Russia Today";
+channels[927]="S19.2E-1-1022-6904";
+channelsnames[928]="RT Esp";
+channels[928]="S19.2E-1-1020-7013";
channelsnames[950]="Travel Channel";
channels[950]="S28.2E-2-2602-54102";
channelsnames[951]="Travel Ch +1";
@@ -1296,12 +1264,10 @@ channelsnames[1264]="Eden HD";
channels[1264]="S28.2E-2-2020-3868";
channelsnames[1265]="Good Food HD";
channels[1265]="S28.2E-2-2027-3867";
-channelsnames[1266]="Good Food HD";
-channels[1266]="S28.2E-2-2033-3867";
-channelsnames[1267]="Sky Insider HD";
-channels[1267]="S28.2E-2-2035-3101";
-channelsnames[1268]="Sky Living HD";
-channels[1268]="S28.2E-2-2005-3866";
+channelsnames[1266]="Sky Insider HD";
+channels[1266]="S28.2E-2-2035-3101";
+channelsnames[1267]="Sky Living HD";
+channels[1267]="S28.2E-2-2005-3866";
channelsnames[1300]="CBBC HD";
channels[1300]="S28.2E-2-2050-6952";
channelsnames[1301]="CBeebies HD";
@@ -1380,7 +1346,7 @@ channelsnames[1450]="Fox HD OBSOLETE";
channels[1450]="S19.2E-133-14-124";
channelsnames[1451]="Discovery HD,DiscHD";
channels[1451]="S19.2E-133-6-130";
-channelsnames[1452]="Sky Cinema HD,CinemaHD";
+channelsnames[1452]="Sky Cinema HD,SkyCineHD";
channels[1452]="S19.2E-133-6-131";
channelsnames[1453]="NatGeo HD,NatGeoHD";
channels[1453]="S19.2E-133-13-112";
@@ -1428,9 +1394,9 @@ channelsnames[1557]="Sky Sports 3 HD";
channels[1557]="S28.2E-2-2034-3822";
channelsnames[1558]="Sky Sports 3 HD";
channels[1558]="S28.2E-2-2034-3824";
-channelsnames[1559]="Sky Sports 4 HD";
+channelsnames[1559]="SkyRyderCupHD";
channels[1559]="S28.2E-2-2033-3826";
-channelsnames[1560]="Sky Sports 4 HD";
+channelsnames[1560]="SkyRyderCupHD";
channels[1560]="S28.2E-2-2033-3827";
channelsnames[1561]="AutoMotorSport HD";
channels[1561]="S23.5E-3-3217-6103";
@@ -1438,7 +1404,7 @@ channelsnames[1600]="MTV Live HD";
channels[1600]="S28.2E-2-2001-3806";
channelsnames[1601]="Planeta HD";
channels[1601]="S23.5E-3-3206-5410";
-channelsnames[1602]="Deluxe Music HD";
+channelsnames[1602]=".";
channels[1602]="S23.5E-3-3217-6100";
channelsnames[1603]="UNITEL CLASSICA HD";
channels[1603]="S23.5E-3-3217-6101";
@@ -1642,282 +1608,278 @@ channelsnames[2091]="Feeds 2 TSA";
channels[2091]="S30.0W-2-15-5";
channelsnames[2092]="Feeds 3 TSA";
channels[2092]="S30.0W-2-15-6";
-channelsnames[2093]="TSA Test";
-channels[2093]="S30.0W-2-15-7";
-channelsnames[2094]="HIGH TV 3D";
-channels[2094]="S30.0W-2-15-11";
-channelsnames[2095]="CANAL+ 1";
-channels[2095]="S30.0W-49-2-1";
-channelsnames[2096]="C+ DCINE";
-channels[2096]="S30.0W-49-4-43";
-channelsnames[2097]="CANAL+1 ...30";
-channels[2097]="S30.0W-49-4-3";
-channelsnames[2098]="FOX";
-channels[2098]="S30.0W-49-4-21";
-channelsnames[2099]="AXN";
-channels[2099]="S30.0W-49-4-22";
-channelsnames[2100]="FOX CRIME";
-channels[2100]="S30.0W-49-4-27";
-channelsnames[2101]="AXN WHITE";
-channels[2101]="S30.0W-49-4-28";
-channelsnames[2102]="C+ ACCIÓN";
-channels[2102]="S30.0W-49-4-41";
-channelsnames[2103]="C+ COMEDIA";
-channels[2103]="S30.0W-49-4-42";
-channelsnames[2104]="EL GARAGE TV";
-channels[2104]="S30.0W-49-4-64";
-channelsnames[2105]="NOVA";
-channels[2105]="S30.0W-49-4-95";
-channelsnames[2106]="Paquetes";
-channels[2106]="S30.0W-49-4-1001";
-channelsnames[2107]="C+LIGA MULTI";
-channels[2107]="S30.0W-49-6-52";
-channelsnames[2108]="C+ TOROS";
-channels[2108]="S30.0W-49-6-67";
-channelsnames[2109]="TAQUILLA 5";
-channels[2109]="S30.0W-49-6-125";
-channelsnames[2110]="TAQUILLA 6";
-channels[2110]="S30.0W-49-6-126";
-channelsnames[2111]="TAQUILLA 7";
-channels[2111]="S30.0W-49-6-127";
-channelsnames[2112]="TAQUILLA 8";
-channels[2112]="S30.0W-49-6-128";
-channelsnames[2113]="TAQUILLAX";
-channels[2113]="S30.0W-49-6-131";
-channelsnames[2114]="TAQUILLAXX";
-channels[2114]="S30.0W-49-6-132";
-channelsnames[2115]="TAQ XXHARD";
-channels[2115]="S30.0W-49-6-133";
-channelsnames[2116]="MULTI-X (1)";
-channels[2116]="S30.0W-49-6-136";
-channelsnames[2117]="MULTI-X (2)";
-channels[2117]="S30.0W-49-6-137";
-channelsnames[2118]="C+LCampeones";
-channels[2118]="S30.0W-49-6-141";
-channelsnames[2119]="C+LCampeon2";
-channels[2119]="S30.0W-49-6-142";
-channelsnames[2120]="C+LCampeon3";
-channels[2120]="S30.0W-49-6-143";
-channelsnames[2121]="MULTIDEP.6";
-channels[2121]="S30.0W-49-6-195";
-channelsnames[2122]="MULTIDEP.7";
-channels[2122]="S30.0W-49-6-196";
-channelsnames[2123]="PUBLIACTIVA";
-channels[2123]="S30.0W-49-6-347";
-channelsnames[2124]="TVCine 2";
-channels[2124]="S30.0W-54-42-700";
-channelsnames[2125]="Nickelodeon";
-channels[2125]="S30.0W-54-42-701";
-channelsnames[2126]="TVCine 3";
-channels[2126]="S30.0W-54-42-706";
-channelsnames[2127]="TVCine 1";
-channels[2127]="S30.0W-54-42-707";
-channelsnames[2128]="TVCine 4";
-channels[2128]="S30.0W-54-42-709";
-channelsnames[2129]="MOV";
-channels[2129]="S30.0W-54-42-711";
-channelsnames[2130]="TVE Internacional";
-channels[2130]="S30.0W-54-42-713";
-channelsnames[2131]="National Geographic";
-channels[2131]="S30.0W-54-42-714";
-channelsnames[2132]="TV Globo Portugal";
-channels[2132]="S30.0W-54-42-904";
-channelsnames[2133]="RTP Madeira";
-channels[2133]="S30.0W-54-42-935";
-channelsnames[2134]="Canal de Teste";
-channels[2134]="S30.0W-54-36-1";
-channelsnames[2135]="RTP Informação";
-channels[2135]="S30.0W-54-36-101";
-channelsnames[2136]="Panda Biggs";
-channels[2136]="S30.0W-54-36-102";
-channelsnames[2137]="Canal de Teste";
-channels[2137]="S30.0W-54-36-111";
-channelsnames[2138]="Canal Panda";
-channels[2138]="S30.0W-54-36-708";
-channelsnames[2139]="SIC Notícias";
-channels[2139]="S30.0W-54-36-801";
-channelsnames[2140]="RTP 1";
-channels[2140]="S30.0W-54-36-811";
-channelsnames[2141]="RTP 2";
-channels[2141]="S30.0W-54-36-812";
-channelsnames[2142]="TVI";
-channels[2142]="S30.0W-54-36-814";
-channelsnames[2143]="Sport TV Golfe";
-channels[2143]="S30.0W-54-37-219";
-channelsnames[2144]="Eurosport News";
-channels[2144]="S30.0W-54-37-227";
-channelsnames[2145]="TVE 24h";
-channels[2145]="S30.0W-54-37-228";
-channelsnames[2146]="EuroNews";
-channels[2146]="S30.0W-54-37-702";
-channelsnames[2147]="SIC Mulher";
-channels[2147]="S30.0W-54-37-703";
-channelsnames[2148]="TLC";
-channels[2148]="S30.0W-54-37-704";
-channelsnames[2149]="France 24";
-channels[2149]="S30.0W-54-37-720";
-channelsnames[2150]="Hot";
-channels[2150]="S30.0W-54-37-831";
-channelsnames[2151]="SLIDE TSCS2";
-channels[2151]="S30.0W-54-37-961";
-channelsnames[2152]="CNN";
-channels[2152]="S30.0W-54-37-962";
-channelsnames[2153]="Mezzo";
-channels[2153]="S30.0W-54-37-965";
-channelsnames[2154]="SKY News";
-channels[2154]="S30.0W-54-37-966";
-channelsnames[2155]="MEZZO";
-channels[2155]="S30.0W-54-37-2000";
-channelsnames[2156]="BBC WORLD";
-channels[2156]="S30.0W-54-37-2001";
-channelsnames[2157]="CNN INT";
-channels[2157]="S30.0W-54-37-2002";
-channelsnames[2158]="CNBC";
-channels[2158]="S30.0W-54-37-2005";
-channelsnames[2159]="EURONEWS";
-channels[2159]="S30.0W-54-37-2006";
-channelsnames[2160]="FRANCE 24 ENG";
-channels[2160]="S30.0W-54-37-2007";
-channelsnames[2161]="NG_DVR_5.4";
-channels[2161]="S30.0W-54-38-19";
-channelsnames[2162]="NG_Zapper_3.8";
-channels[2162]="S30.0W-54-38-20";
-channelsnames[2163]="NG_DVR_3.8";
-channels[2163]="S30.0W-54-38-21";
-channelsnames[2164]="NG_ZAPPER_5.8";
-channels[2164]="S30.0W-54-38-22";
-channelsnames[2165]="NG_DVR_5.8";
-channels[2165]="S30.0W-54-38-23";
-channelsnames[2166]="Playboy TV";
-channels[2166]="S30.0W-54-38-169";
-channelsnames[2167]="Sport TV 2";
-channels[2167]="S30.0W-54-38-301";
-channelsnames[2168]="Canal de teste";
-channels[2168]="S30.0W-54-38-302";
-channelsnames[2169]="AR TV";
-channels[2169]="S30.0W-54-38-303";
-channelsnames[2170]="Globo";
-channels[2170]="S30.0W-54-38-304";
-channelsnames[2171]="TVI 24";
-channels[2171]="S30.0W-54-38-305";
-channelsnames[2172]="Sport TV 3";
-channels[2172]="S30.0W-54-38-306";
-channelsnames[2173]="TV Record";
-channels[2173]="S30.0W-54-38-308";
-channelsnames[2174]="Sport TV Live";
-channels[2174]="S30.0W-54-38-309";
-channelsnames[2175]="RTP Memória";
-channels[2175]="S30.0W-54-38-310";
-channelsnames[2176]="Eurosport";
-channels[2176]="S30.0W-54-38-312";
-channelsnames[2177]="Hollywood";
-channels[2177]="S30.0W-54-38-313";
-channelsnames[2178]="MOV";
-channels[2178]="S30.0W-54-38-314";
-channelsnames[2179]="Canal de Teste";
-channels[2179]="S30.0W-54-38-701";
-channelsnames[2180]="SIC Radical";
-channels[2180]="S30.0W-54-40-502";
-channelsnames[2181]="Panda Biggs";
-channels[2181]="S30.0W-54-40-503";
-channelsnames[2182]="BBC Entertainment";
-channels[2182]="S30.0W-54-40-506";
-channelsnames[2183]="E! Entertainment";
-channels[2183]="S30.0W-54-40-507";
-channelsnames[2184]="Baby First";
-channels[2184]="S30.0W-54-40-509";
-channelsnames[2185]="Caça e Pesca";
-channels[2185]="S30.0W-54-40-933";
-channelsnames[2186]="Disney Junior";
-channels[2186]="S30.0W-54-40-939";
-channelsnames[2187]="CBS Reality";
-channels[2187]="S30.0W-54-41-604";
-channelsnames[2188]="RTP Açores";
-channels[2188]="S30.0W-54-41-605";
-channelsnames[2189]="NBA TV";
-channels[2189]="S30.0W-54-41-609";
-channelsnames[2190]="Canção Nova";
-channels[2190]="S30.0W-54-41-610";
-channelsnames[2191]="Novo SD TSCS6- 01";
-channels[2191]="S30.0W-54-41-611";
-channelsnames[2192]="Cartoon / TCM";
-channels[2192]="S30.0W-54-41-613";
-channelsnames[2193]="Canal Q";
-channels[2193]="S30.0W-54-41-959";
-channelsnames[2194]="C+ YOMVI";
-channels[2194]="S30.0W-49-9-7";
-channelsnames[2195]="COSMOPOLITAN";
-channels[2195]="S30.0W-49-9-26";
-channelsnames[2196]="HISTORIA";
-channels[2196]="S30.0W-49-9-35";
-channelsnames[2197]="BIO";
-channels[2197]="S30.0W-49-9-36";
-channelsnames[2198]="CINEMAGIC";
-channels[2198]="S30.0W-49-9-44";
-channelsnames[2199]="DCINEESPAÑOL";
-channels[2199]="S30.0W-49-9-48";
-channelsnames[2200]="EUROSPORT";
-channels[2200]="S30.0W-49-9-60";
-channelsnames[2201]="CAZA Y PESCA";
-channels[2201]="S30.0W-49-9-66";
-channelsnames[2202]="DISNEY XD";
-channels[2202]="S30.0W-49-9-72";
-channelsnames[2203]="CINEMAGIC";
-channels[2203]="S30.0W-49-9-73";
-channelsnames[2204]="24 HORAS";
-channels[2204]="S30.0W-49-9-100";
-channelsnames[2205]="BLOOMBERG";
-channels[2205]="S30.0W-49-9-102";
-channelsnames[2206]="Eventos";
-channels[2206]="S30.0W-49-9-500";
-channelsnames[2207]="Caça e Pesca";
-channels[2207]="S30.0W-49-9-3000";
-channelsnames[2208]="Eurosport";
-channels[2208]="S30.0W-49-9-3002";
-channelsnames[2209]="Canal de História";
-channels[2209]="S30.0W-49-9-3003";
-channelsnames[2210]="Bloomberg";
-channels[2210]="S30.0W-49-9-3004";
-channelsnames[2211]="TVE 24h";
-channels[2211]="S30.0W-49-9-3006";
-channelsnames[2212]="9006";
-channels[2212]="S28.2E-2-2007-9006";
-channelsnames[2213]="MTV ESPAÑA";
-channels[2213]="S30.0W-49-5-29";
-channelsnames[2214]="LTC";
-channels[2214]="S30.0W-49-5-39";
-channelsnames[2215]="BARÇA TV";
-channels[2215]="S30.0W-49-5-63";
-channelsnames[2216]="MOTORS TV";
-channels[2216]="S30.0W-49-5-65";
-channelsnames[2217]="DIVINITY";
-channels[2217]="S30.0W-49-5-90";
-channelsnames[2218]="ENERGY";
-channels[2218]="S30.0W-49-5-91";
-channelsnames[2219]="FOX NEWS";
-channels[2219]="S30.0W-49-5-105";
-channelsnames[2220]="C.ESTRELLAS";
-channels[2220]="S30.0W-49-5-117";
-channelsnames[2221]="C+ MultiCINE";
-channels[2221]="S30.0W-49-8-6";
-channelsnames[2222]="C+ MultiCINE";
-channels[2222]="S30.0W-49-8-40";
-channelsnames[2223]="C+ MultiDEP";
-channels[2223]="S30.0W-49-8-50";
-channelsnames[2224]="NICKELODEON";
-channels[2224]="S30.0W-49-8-74";
-channelsnames[2225]="TAQUILLA 1";
-channels[2225]="S30.0W-49-8-121";
-channelsnames[2226]="TAQUILLA 2";
-channels[2226]="S30.0W-49-8-122";
-channelsnames[2227]="TAQUILLA 3";
-channels[2227]="S30.0W-49-8-123";
-channelsnames[2228]="TAQUILLA 4";
-channels[2228]="S30.0W-49-8-124";
-channelsnames[2229]="TAQUILLA X";
-channels[2229]="S30.0W-49-8-139";
-channelsnames[2230]="MULTIDEP.4";
-channels[2230]="S30.0W-49-8-193";
+channelsnames[2093]="HIGH TV 3D";
+channels[2093]="S30.0W-2-15-11";
+channelsnames[2094]="CANAL+ 1";
+channels[2094]="S30.0W-49-2-1";
+channelsnames[2095]="C+ DCINE";
+channels[2095]="S30.0W-49-4-43";
+channelsnames[2096]="CANAL+1 ...30";
+channels[2096]="S30.0W-49-4-3";
+channelsnames[2097]="FOX";
+channels[2097]="S30.0W-49-4-21";
+channelsnames[2098]="AXN";
+channels[2098]="S30.0W-49-4-22";
+channelsnames[2099]="FOX CRIME";
+channels[2099]="S30.0W-49-4-27";
+channelsnames[2100]="AXN WHITE";
+channels[2100]="S30.0W-49-4-28";
+channelsnames[2101]="C+ ACCIÓN";
+channels[2101]="S30.0W-49-4-41";
+channelsnames[2102]="C+ COMEDIA";
+channels[2102]="S30.0W-49-4-42";
+channelsnames[2103]="EL GARAGE TV";
+channels[2103]="S30.0W-49-4-64";
+channelsnames[2104]="NOVA";
+channels[2104]="S30.0W-49-4-95";
+channelsnames[2105]="Paquetes";
+channels[2105]="S30.0W-49-4-1001";
+channelsnames[2106]="C+LIGA MULTI";
+channels[2106]="S30.0W-49-6-52";
+channelsnames[2107]="C+ TOROS";
+channels[2107]="S30.0W-49-6-67";
+channelsnames[2108]="TAQUILLA 5";
+channels[2108]="S30.0W-49-6-125";
+channelsnames[2109]="TAQUILLA 6";
+channels[2109]="S30.0W-49-6-126";
+channelsnames[2110]="TAQUILLA 7";
+channels[2110]="S30.0W-49-6-127";
+channelsnames[2111]="TAQUILLA 8";
+channels[2111]="S30.0W-49-6-128";
+channelsnames[2112]="TAQUILLAX";
+channels[2112]="S30.0W-49-6-131";
+channelsnames[2113]="TAQUILLAXX";
+channels[2113]="S30.0W-49-6-132";
+channelsnames[2114]="TAQ XXHARD";
+channels[2114]="S30.0W-49-6-133";
+channelsnames[2115]="MULTI-X (1)";
+channels[2115]="S30.0W-49-6-136";
+channelsnames[2116]="MULTI-X (2)";
+channels[2116]="S30.0W-49-6-137";
+channelsnames[2117]="C+LCampeones";
+channels[2117]="S30.0W-49-6-141";
+channelsnames[2118]="C+LCampeon2";
+channels[2118]="S30.0W-49-6-142";
+channelsnames[2119]="C+LCampeon3";
+channels[2119]="S30.0W-49-6-143";
+channelsnames[2120]="MULTIDEP.6";
+channels[2120]="S30.0W-49-6-195";
+channelsnames[2121]="MULTIDEP.7";
+channels[2121]="S30.0W-49-6-196";
+channelsnames[2122]="PUBLIACTIVA";
+channels[2122]="S30.0W-49-6-347";
+channelsnames[2123]="TVCine 2";
+channels[2123]="S30.0W-54-42-700";
+channelsnames[2124]="Nickelodeon";
+channels[2124]="S30.0W-54-42-701";
+channelsnames[2125]="TVCine 3";
+channels[2125]="S30.0W-54-42-706";
+channelsnames[2126]="TVCine 1";
+channels[2126]="S30.0W-54-42-707";
+channelsnames[2127]="TVCine 4";
+channels[2127]="S30.0W-54-42-709";
+channelsnames[2128]="MOV";
+channels[2128]="S30.0W-54-42-711";
+channelsnames[2129]="TVE Internacional";
+channels[2129]="S30.0W-54-42-713";
+channelsnames[2130]="National Geographic";
+channels[2130]="S30.0W-54-42-714";
+channelsnames[2131]="TV Globo Portugal";
+channels[2131]="S30.0W-54-42-904";
+channelsnames[2132]="RTP Madeira";
+channels[2132]="S30.0W-54-42-935";
+channelsnames[2133]="Canal de Teste";
+channels[2133]="S30.0W-54-36-1";
+channelsnames[2134]="RTP Informação";
+channels[2134]="S30.0W-54-36-101";
+channelsnames[2135]="Panda Biggs";
+channels[2135]="S30.0W-54-36-102";
+channelsnames[2136]="Canal de Teste";
+channels[2136]="S30.0W-54-36-111";
+channelsnames[2137]="Canal Panda";
+channels[2137]="S30.0W-54-36-708";
+channelsnames[2138]="SIC Notícias";
+channels[2138]="S30.0W-54-36-801";
+channelsnames[2139]="RTP 1";
+channels[2139]="S30.0W-54-36-811";
+channelsnames[2140]="RTP 2";
+channels[2140]="S30.0W-54-36-812";
+channelsnames[2141]="TVI";
+channels[2141]="S30.0W-54-36-814";
+channelsnames[2142]="Sport TV Golfe";
+channels[2142]="S30.0W-54-37-219";
+channelsnames[2143]="Eurosport News";
+channels[2143]="S30.0W-54-37-227";
+channelsnames[2144]="TVE 24h";
+channels[2144]="S30.0W-54-37-228";
+channelsnames[2145]="EuroNews";
+channels[2145]="S30.0W-54-37-702";
+channelsnames[2146]="SIC Mulher";
+channels[2146]="S30.0W-54-37-703";
+channelsnames[2147]="TLC";
+channels[2147]="S30.0W-54-37-704";
+channelsnames[2148]="France 24";
+channels[2148]="S30.0W-54-37-720";
+channelsnames[2149]="Hot";
+channels[2149]="S30.0W-54-37-831";
+channelsnames[2150]="SLIDE TSCS2";
+channels[2150]="S30.0W-54-37-961";
+channelsnames[2151]="CNN";
+channels[2151]="S30.0W-54-37-962";
+channelsnames[2152]="Mezzo";
+channels[2152]="S30.0W-54-37-965";
+channelsnames[2153]="SKY News";
+channels[2153]="S30.0W-54-37-966";
+channelsnames[2154]="MEZZO";
+channels[2154]="S30.0W-54-37-2000";
+channelsnames[2155]="BBC WORLD";
+channels[2155]="S30.0W-54-37-2001";
+channelsnames[2156]="CNN INT";
+channels[2156]="S30.0W-54-37-2002";
+channelsnames[2157]="CNBC";
+channels[2157]="S30.0W-54-37-2005";
+channelsnames[2158]="EURONEWS";
+channels[2158]="S30.0W-54-37-2006";
+channelsnames[2159]="FRANCE 24 ENG";
+channels[2159]="S30.0W-54-37-2007";
+channelsnames[2160]="NG_DVR_5.4";
+channels[2160]="S30.0W-54-38-19";
+channelsnames[2161]="NG_Zapper_3.8";
+channels[2161]="S30.0W-54-38-20";
+channelsnames[2162]="NG_DVR_3.8";
+channels[2162]="S30.0W-54-38-21";
+channelsnames[2163]="NG_ZAPPER_5.8";
+channels[2163]="S30.0W-54-38-22";
+channelsnames[2164]="NG_DVR_5.8";
+channels[2164]="S30.0W-54-38-23";
+channelsnames[2165]="Playboy TV";
+channels[2165]="S30.0W-54-38-169";
+channelsnames[2166]="Sport TV 2";
+channels[2166]="S30.0W-54-38-301";
+channelsnames[2167]="Canal de teste";
+channels[2167]="S30.0W-54-38-302";
+channelsnames[2168]="AR TV";
+channels[2168]="S30.0W-54-38-303";
+channelsnames[2169]="Globo";
+channels[2169]="S30.0W-54-38-304";
+channelsnames[2170]="TVI 24";
+channels[2170]="S30.0W-54-38-305";
+channelsnames[2171]="Sport TV 3";
+channels[2171]="S30.0W-54-38-306";
+channelsnames[2172]="TV Record";
+channels[2172]="S30.0W-54-38-308";
+channelsnames[2173]="Sport TV Live";
+channels[2173]="S30.0W-54-38-309";
+channelsnames[2174]="RTP Memória";
+channels[2174]="S30.0W-54-38-310";
+channelsnames[2175]="Eurosport";
+channels[2175]="S30.0W-54-38-312";
+channelsnames[2176]="Hollywood";
+channels[2176]="S30.0W-54-38-313";
+channelsnames[2177]="MOV";
+channels[2177]="S30.0W-54-38-314";
+channelsnames[2178]="Canal de Teste";
+channels[2178]="S30.0W-54-38-701";
+channelsnames[2179]="SIC Radical";
+channels[2179]="S30.0W-54-40-502";
+channelsnames[2180]="Panda Biggs";
+channels[2180]="S30.0W-54-40-503";
+channelsnames[2181]="BBC Entertainment";
+channels[2181]="S30.0W-54-40-506";
+channelsnames[2182]="E! Entertainment";
+channels[2182]="S30.0W-54-40-507";
+channelsnames[2183]="Baby First";
+channels[2183]="S30.0W-54-40-509";
+channelsnames[2184]="Caça e Pesca";
+channels[2184]="S30.0W-54-40-933";
+channelsnames[2185]="Disney Junior";
+channels[2185]="S30.0W-54-40-939";
+channelsnames[2186]="CBS Reality";
+channels[2186]="S30.0W-54-41-604";
+channelsnames[2187]="RTP Açores";
+channels[2187]="S30.0W-54-41-605";
+channelsnames[2188]="NBA TV";
+channels[2188]="S30.0W-54-41-609";
+channelsnames[2189]="Canção Nova";
+channels[2189]="S30.0W-54-41-610";
+channelsnames[2190]="Novo SD TSCS6- 01";
+channels[2190]="S30.0W-54-41-611";
+channelsnames[2191]="Cartoon / TCM";
+channels[2191]="S30.0W-54-41-613";
+channelsnames[2192]="Canal Q";
+channels[2192]="S30.0W-54-41-959";
+channelsnames[2193]="C+ YOMVI";
+channels[2193]="S30.0W-49-9-7";
+channelsnames[2194]="COSMOPOLITAN";
+channels[2194]="S30.0W-49-9-26";
+channelsnames[2195]="HISTORIA";
+channels[2195]="S30.0W-49-9-35";
+channelsnames[2196]="BIO";
+channels[2196]="S30.0W-49-9-36";
+channelsnames[2197]="CINEMAGIC";
+channels[2197]="S30.0W-49-9-44";
+channelsnames[2198]="DCINEESPAÑOL";
+channels[2198]="S30.0W-49-9-48";
+channelsnames[2199]="EUROSPORT";
+channels[2199]="S30.0W-49-9-60";
+channelsnames[2200]="CAZA Y PESCA";
+channels[2200]="S30.0W-49-9-66";
+channelsnames[2201]="DISNEY XD";
+channels[2201]="S30.0W-49-9-72";
+channelsnames[2202]="CINEMAGIC";
+channels[2202]="S30.0W-49-9-73";
+channelsnames[2203]="24 HORAS";
+channels[2203]="S30.0W-49-9-100";
+channelsnames[2204]="BLOOMBERG";
+channels[2204]="S30.0W-49-9-102";
+channelsnames[2205]="Eventos";
+channels[2205]="S30.0W-49-9-500";
+channelsnames[2206]="Caça e Pesca";
+channels[2206]="S30.0W-49-9-3000";
+channelsnames[2207]="Eurosport";
+channels[2207]="S30.0W-49-9-3002";
+channelsnames[2208]="Canal de História";
+channels[2208]="S30.0W-49-9-3003";
+channelsnames[2209]="Bloomberg";
+channels[2209]="S30.0W-49-9-3004";
+channelsnames[2210]="TVE 24h";
+channels[2210]="S30.0W-49-9-3006";
+channelsnames[2211]="MTV ESPAÑA";
+channels[2211]="S30.0W-49-5-29";
+channelsnames[2212]="LTC";
+channels[2212]="S30.0W-49-5-39";
+channelsnames[2213]="BARÇA TV";
+channels[2213]="S30.0W-49-5-63";
+channelsnames[2214]="MOTORS TV";
+channels[2214]="S30.0W-49-5-65";
+channelsnames[2215]="DIVINITY";
+channels[2215]="S30.0W-49-5-90";
+channelsnames[2216]="ENERGY";
+channels[2216]="S30.0W-49-5-91";
+channelsnames[2217]="FOX NEWS";
+channels[2217]="S30.0W-49-5-105";
+channelsnames[2218]="C.ESTRELLAS";
+channels[2218]="S30.0W-49-5-117";
+channelsnames[2219]="C+ MultiCINE";
+channels[2219]="S30.0W-49-8-6";
+channelsnames[2220]="C+ MultiCINE";
+channels[2220]="S30.0W-49-8-40";
+channelsnames[2221]="C+ MultiDEP";
+channels[2221]="S30.0W-49-8-50";
+channelsnames[2222]="NICKELODEON";
+channels[2222]="S30.0W-49-8-74";
+channelsnames[2223]="TAQUILLA 1";
+channels[2223]="S30.0W-49-8-121";
+channelsnames[2224]="TAQUILLA 2";
+channels[2224]="S30.0W-49-8-122";
+channelsnames[2225]="TAQUILLA 3";
+channels[2225]="S30.0W-49-8-123";
+channelsnames[2226]="TAQUILLA 4";
+channels[2226]="S30.0W-49-8-124";
+channelsnames[2227]="TAQUILLA X";
+channels[2227]="S30.0W-49-8-139";
+channelsnames[2228]="MULTIDEP.4";
+channels[2228]="S30.0W-49-8-193";
channelsnames[3000]="TV3 Lithuania";
channels[3000]="S5.0E-85-14-6340";
channelsnames[3001]="TV6 Lithuania";
@@ -1964,11 +1926,11 @@ channelsnames[3021]="Viasat History";
channels[3021]="S5.0E-86-8-6050";
channelsnames[3022]="Viasat Nature East";
channels[3022]="S5.0E-86-8-6030";
-channelsnames[3023]="Discovery EE";
+channelsnames[3023]="Ohota Rybalka";
channels[3023]="S5.0E-86-22-3630";
channelsnames[3024]="National Geographic (S)";
channels[3024]="S5.0E-86-22-3690";
-channelsnames[3025]="Animal Planet EE";
+channelsnames[3025]="History Channel";
channels[3025]="S5.0E-86-22-3620";
channelsnames[3026]="Nick No/VH1 Classic";
channels[3026]="S5.0E-86-24-4460";
@@ -1978,7 +1940,7 @@ channelsnames[3028]="TV1000 Action East";
channels[3028]="S5.0E-86-21-3410";
channelsnames[3029]="TV1000 Ru Kino";
channels[3029]="S5.0E-86-9-7080";
-channelsnames[3030]="Cartoon/TCM EE";
+channelsnames[3030]="Cartoon Network EE";
channels[3030]="S5.0E-86-22-3610";
channelsnames[3031]="Viasat Sport Baltic";
channels[3031]="S5.0E-86-8-6060";
@@ -2006,54 +1968,52 @@ channelsnames[3042]="CNN";
channels[3042]="S5.0E-86-9-7040";
channelsnames[3043]="Russia Today";
channels[3043]="S5.0E-86-6-4080";
-channelsnames[3044]="Euronews";
-channels[3044]="S5.0E-86-6-4020";
-channelsnames[3045]="CNBC";
-channels[3045]="S5.0E-86-6-4180";
-channelsnames[3046]="Viasat Xtra 1";
-channels[3046]="S5.0E-86-10-8000";
-channelsnames[3047]="Viasat Xtra 2";
-channels[3047]="S5.0E-86-10-8010";
-channelsnames[3048]="Viasat Xtra 3";
-channels[3048]="S5.0E-86-10-8020";
-channelsnames[3049]="Viasat Xtra 4";
-channels[3049]="S5.0E-86-10-8030";
-channelsnames[3050]="Viasat Xtra 5";
-channels[3050]="S5.0E-86-10-8040";
-channelsnames[3051]="Viasat Xtra 6";
-channels[3051]="S5.0E-86-10-8080";
-channelsnames[3052]="Viasat Xtra 7";
-channels[3052]="S5.0E-86-10-8050";
-channelsnames[3053]="Viasat Xtra PL1";
-channels[3053]="S5.0E-86-10-7900";
-channelsnames[3054]="Viasat Xtra PL2";
-channels[3054]="S5.0E-86-10-7910";
-channelsnames[3055]="Viasat Xtra PL3";
-channels[3055]="S5.0E-86-10-7920";
-channelsnames[3056]="Viasat Xtra PL4";
-channels[3056]="S5.0E-86-10-7930";
-channelsnames[3057]="Viasat Xtra PL5";
-channels[3057]="S5.0E-86-10-7940";
-channelsnames[3058]="Viasat Xtra PL6";
-channels[3058]="S5.0E-86-10-7950";
-channelsnames[3059]="Viasat Xtra PL7";
-channels[3059]="S5.0E-86-10-7960";
-channelsnames[3060]="Viasat Xtra NHL1";
-channels[3060]="S5.0E-86-10-7970";
-channelsnames[3061]="Viasat Xtra NHL2";
-channels[3061]="S5.0E-86-10-7980";
-channelsnames[3062]="Viasat Xtra NHL3";
-channels[3062]="S5.0E-86-10-7990";
-channelsnames[3063]="Viasat Xtra NHL4";
-channels[3063]="S5.0E-86-10-8150";
-channelsnames[3064]="Viasat Xtra NHL5";
-channels[3064]="S5.0E-86-10-8160";
-channelsnames[3065]="Viasat Xtra NHL6";
-channels[3065]="S5.0E-86-10-8170";
-channelsnames[3066]="Viasat Xtra NHL7";
-channels[3066]="S5.0E-86-10-8180";
-channelsnames[3067]="Nature/Crime/Playboy";
-channels[3067]="S5.0E-86-4-2110";
+channelsnames[3044]="CNBC";
+channels[3044]="S5.0E-86-6-4180";
+channelsnames[3045]="Viasat Xtra 1";
+channels[3045]="S5.0E-86-10-8000";
+channelsnames[3046]="Viasat Xtra 2";
+channels[3046]="S5.0E-86-10-8010";
+channelsnames[3047]="Viasat Xtra 3";
+channels[3047]="S5.0E-86-10-8020";
+channelsnames[3048]="Viasat Xtra 4";
+channels[3048]="S5.0E-86-10-8030";
+channelsnames[3049]="Viasat Xtra 5";
+channels[3049]="S5.0E-86-10-8040";
+channelsnames[3050]="Viasat Xtra 6";
+channels[3050]="S5.0E-86-10-8080";
+channelsnames[3051]="Viasat Xtra 7";
+channels[3051]="S5.0E-86-10-8050";
+channelsnames[3052]="Viasat Xtra PL1";
+channels[3052]="S5.0E-86-10-7900";
+channelsnames[3053]="Viasat Xtra PL2";
+channels[3053]="S5.0E-86-10-7910";
+channelsnames[3054]="Viasat Xtra PL3";
+channels[3054]="S5.0E-86-10-7920";
+channelsnames[3055]="Viasat Xtra PL4";
+channels[3055]="S5.0E-86-10-7930";
+channelsnames[3056]="Viasat Xtra PL5";
+channels[3056]="S5.0E-86-10-7940";
+channelsnames[3057]="Viasat Xtra PL6";
+channels[3057]="S5.0E-86-10-7950";
+channelsnames[3058]="Viasat Xtra PL7";
+channels[3058]="S5.0E-86-10-7960";
+channelsnames[3059]="Viasat Xtra NHL1";
+channels[3059]="S5.0E-86-10-7970";
+channelsnames[3060]="Viasat Xtra NHL2";
+channels[3060]="S5.0E-86-10-7980";
+channelsnames[3061]="Viasat Xtra NHL3";
+channels[3061]="S5.0E-86-10-7990";
+channelsnames[3062]="Viasat Xtra NHL4";
+channels[3062]="S5.0E-86-10-8150";
+channelsnames[3063]="Viasat Xtra NHL5";
+channels[3063]="S5.0E-86-10-8160";
+channelsnames[3064]="Viasat Xtra NHL6";
+channels[3064]="S5.0E-86-10-8170";
+channelsnames[3065]="Viasat Xtra NHL7";
+channels[3065]="S5.0E-86-10-8180";
+channelsnames[3066]="Nature/Crime/Playboy";
+channels[3066]="S5.0E-86-4-2110";
channelsnames[3100]="Romantica 2";
channels[3100]="S5.0E-0-0-8";
channelsnames[3101]="Absolute Radio";
@@ -2138,326 +2098,322 @@ channelsnames[3238]="TVCI new";
channels[3238]="S5.0E-85-2-220";
channelsnames[3239]="European Radio for Belarus";
channels[3239]="S5.0E-85-2-230";
-channelsnames[3240]="Radio Vocea Evangheliei";
-channels[3240]="S5.0E-85-2-232";
-channelsnames[3241]="K75 International";
-channels[3241]="S5.0E-85-2-260";
-channelsnames[3242]="Viasat Promo";
-channels[3242]="S5.0E-85-2-270";
-channelsnames[3243]="Espreso TV";
-channels[3243]="S5.0E-85-2-280";
-channelsnames[3244]="Viasat Sport Sverige";
-channels[3244]="S5.0E-86-4-2100";
-channelsnames[3245]="TV3+";
-channels[3245]="S5.0E-86-4-2130";
-channelsnames[3246]="Viasat Hockey";
-channels[3246]="S5.0E-86-4-2140";
-channelsnames[3247]="Viasat 4";
-channels[3247]="S5.0E-86-4-2160";
-channelsnames[3248]="TV4 Fakta";
-channels[3248]="S5.0E-86-4-2180";
-channelsnames[3249]="TV3 Sverige";
-channels[3249]="S5.0E-86-3-1100";
-channelsnames[3250]="TV3 Norge";
-channels[3250]="S5.0E-86-3-1110";
-channelsnames[3251]="TV3 Denmark";
-channels[3251]="S5.0E-86-3-1120";
-channelsnames[3252]="Viasat Film";
-channels[3252]="S5.0E-86-3-1140";
-channelsnames[3253]="VFilm Action";
-channels[3253]="S5.0E-86-3-1150";
-channelsnames[3254]="TV6";
-channels[3254]="S5.0E-86-3-1160";
-channelsnames[3255]="Cartoon Network";
-channels[3255]="S5.0E-86-3-1170";
-channelsnames[3256]="VFilm Drama";
-channels[3256]="S5.0E-86-3-1195";
-channelsnames[3257]="1st Baltic Ch. Estonia";
-channels[3257]="S5.0E-85-13-6200";
-channelsnames[3258]="1st Baltic Ch. Latvia";
-channels[3258]="S5.0E-85-13-6210";
-channelsnames[3259]="Mir Baltic";
-channels[3259]="S5.0E-85-13-6260";
-channelsnames[3260]="Radio 101";
-channels[3260]="S5.0E-85-13-6275";
-channelsnames[3261]="VFilm Family";
-channels[3261]="S5.0E-86-5-3110";
-channelsnames[3262]="VFilm Comedy";
-channels[3262]="S5.0E-86-5-3120";
-channelsnames[3263]="VFilm Classic";
-channels[3263]="S5.0E-86-5-3130";
-channelsnames[3264]="TV1KC";
-channels[3264]="S5.0E-86-5-3139";
-channelsnames[3265]="Euronews";
-channels[3265]="S5.0E-86-7-5000";
-channelsnames[3266]="NHK World TV";
-channels[3266]="S5.0E-86-7-5010";
-channelsnames[3267]="Kunskapskanalen";
-channels[3267]="S5.0E-86-7-5020";
-channelsnames[3268]="SVTB/SVT24";
-channels[3268]="S5.0E-86-7-5030";
-channelsnames[3269]="Nat Geo Wild";
-channels[3269]="S5.0E-86-7-5080";
-channelsnames[3270]="TV 2 Bliss";
-channels[3270]="S5.0E-86-7-5050";
-channelsnames[3271]="TVNorge";
-channels[3271]="S5.0E-86-7-5040";
-channelsnames[3272]="TV4 Guld";
-channels[3272]="S5.0E-86-7-5060";
-channelsnames[3273]="NRK1 HD";
-channels[3273]="S5.0E-86-28-3515";
-channelsnames[3274]="NRK Tegnspråk";
-channels[3274]="S5.0E-86-28-1516";
-channelsnames[3275]="NRK1 Nordnytt";
-channels[3275]="S5.0E-86-28-1521";
-channelsnames[3276]="NRK1 Nordland";
-channels[3276]="S5.0E-86-28-3502";
-channelsnames[3277]="NRK1 Midtnytt";
-channels[3277]="S5.0E-86-28-3503";
-channelsnames[3278]="NRK1 Møre & Romsdal";
-channels[3278]="S5.0E-86-28-3504";
-channelsnames[3279]="NRK1 Vestlandsrevyen";
-channels[3279]="S5.0E-86-28-3505";
-channelsnames[3280]="NRK1 Rogaland";
-channels[3280]="S5.0E-86-28-3506";
-channelsnames[3281]="NRK1 Sørlandet";
-channels[3281]="S5.0E-86-28-3507";
-channelsnames[3282]="NRK1 Østafjells";
-channels[3282]="S5.0E-86-28-1520";
-channelsnames[3283]="NRK1 Østnytt";
-channels[3283]="S5.0E-86-28-3508";
-channelsnames[3284]="NRK1 Østfold";
-channels[3284]="S5.0E-86-28-3509";
-channelsnames[3285]="NRK P1";
-channels[3285]="S5.0E-86-28-1503";
-channelsnames[3286]="NRK P2";
-channels[3286]="S5.0E-86-28-1504";
-channelsnames[3287]="NRK P3";
-channels[3287]="S5.0E-86-28-1505";
-channelsnames[3288]="NRK Klassisk";
-channels[3288]="S5.0E-86-28-1507";
-channelsnames[3289]="NRK Sami Radio";
-channels[3289]="S5.0E-86-28-1510";
-channelsnames[3290]="NRK mP3";
-channels[3290]="S5.0E-86-28-1515";
-channelsnames[3291]="NRK Alltid Nyheter";
-channels[3291]="S5.0E-86-28-511";
-channelsnames[3292]="NRK P13";
-channels[3292]="S5.0E-86-28-3501";
-channelsnames[3293]="NRK Været til sjøs";
-channels[3293]="S5.0E-86-28-3511";
-channelsnames[3294]="NRK Super";
-channels[3294]="S5.0E-86-28-3513";
-channelsnames[3295]="NRK P1+";
-channels[3295]="S5.0E-86-28-3514";
-channelsnames[3296]="NRK Jazz";
-channels[3296]="S5.0E-86-28-3516";
-channelsnames[3297]="TV 2/Bornholm";
-channels[3297]="S5.0E-86-26-4670";
-channelsnames[3298]="TV 2/Fyn";
-channels[3298]="S5.0E-86-26-4640";
-channelsnames[3299]="TV 2/Lorry";
-channels[3299]="S5.0E-86-26-4660";
-channelsnames[3300]="TV 2/Midt-Vest";
-channels[3300]="S5.0E-86-26-4610";
-channelsnames[3301]="TV 2/Nord";
-channels[3301]="S5.0E-86-26-4600";
-channelsnames[3302]="TV 2/Syd";
-channels[3302]="S5.0E-86-26-4630";
-channelsnames[3303]="TV 2/Øst";
-channels[3303]="S5.0E-86-26-4650";
-channelsnames[3304]="TV 2/Østjylland";
-channels[3304]="S5.0E-86-26-4620";
-channelsnames[3305]="Bandit";
-channels[3305]="S5.0E-86-26-4690";
-channelsnames[3306]="Rix FM";
-channels[3306]="S5.0E-86-26-4692";
-channelsnames[3307]="P4 Lyden av Norge";
-channels[3307]="S5.0E-86-26-4694";
-channelsnames[3308]="Lugna Favoriter";
-channels[3308]="S5.0E-86-26-4696";
-channelsnames[3309]="Kanal 2";
-channels[3309]="S5.0E-85-52-2950";
-channelsnames[3310]="Kanal 11";
-channels[3310]="S5.0E-85-52-2960";
-channelsnames[3311]="ETV2";
-channels[3311]="S5.0E-85-52-2970";
-channelsnames[3312]="Golden Oldies";
-channels[3312]="S5.0E-86-22-3716";
-channelsnames[3313]="Jazz";
-channels[3313]="S5.0E-86-22-3718";
-channelsnames[3314]="Classic";
-channels[3314]="S5.0E-86-22-3722";
-channelsnames[3315]="Disco";
-channels[3315]="S5.0E-86-22-3724";
-channelsnames[3316]="Soul R&b";
-channels[3316]="S5.0E-86-22-3728";
-channelsnames[3317]="Super 80's";
-channels[3317]="S5.0E-86-22-3732";
-channelsnames[3318]="TV4";
-channels[3318]="S5.0E-86-22-3670";
-channelsnames[3319]="Comedy Central";
-channels[3319]="S5.0E-86-22-3660";
-channelsnames[3320]="Kanal 5";
-channels[3320]="S5.0E-86-22-3650";
-channelsnames[3321]="National Geographic (N)";
-channels[3321]="S5.0E-86-22-3640";
-channelsnames[3322]="TV10";
-channels[3322]="S5.0E-86-23-3800";
-channelsnames[3323]="Viasat Fotball";
-channels[3323]="S5.0E-86-23-3830";
-channelsnames[3324]="Boomerang";
-channels[3324]="S5.0E-86-23-3850";
-channelsnames[3325]="TV2 Zebra";
-channels[3325]="S5.0E-86-23-3820";
-channelsnames[3326]="TV4 Komedi";
-channels[3326]="S5.0E-86-23-3890";
-channelsnames[3327]="TV12";
-channels[3327]="S5.0E-86-23-3840";
-channelsnames[3328]="Kanal 5";
-channels[3328]="S5.0E-86-23-3880";
-channelsnames[3329]="TV4 Fakta XL";
-channels[3329]="S5.0E-86-23-3860";
-channelsnames[3330]="TV 2 Norge";
-channels[3330]="S5.0E-86-23-3810";
-channelsnames[3331]="TV1000 Premium";
-channels[3331]="S5.0E-85-18-6800";
-channelsnames[3332]="Lithuanian TV1";
-channels[3332]="S5.0E-85-18-6810";
-channelsnames[3333]="CANAL8 Sport";
-channels[3333]="S5.0E-86-24-4410";
-channelsnames[3334]="TV 2 Nyhetskanalen";
-channels[3334]="S5.0E-86-24-4450";
-channelsnames[3335]="dk4";
-channels[3335]="S5.0E-86-24-4470";
-channelsnames[3336]="TVN Chile Nordic";
-channels[3336]="S5.0E-86-6-4000";
-channelsnames[3337]="Visjon Norge";
-channels[3337]="S5.0E-86-6-4010";
-channelsnames[3338]="Kanal 10";
-channels[3338]="S5.0E-86-6-4050";
-channelsnames[3339]="GOD Channel";
-channels[3339]="S5.0E-86-6-4060";
-channelsnames[3340]="Viasat Xtra 8";
-channels[3340]="S5.0E-86-10-8110";
-channelsnames[3341]="Viasat Xtra 9";
-channels[3341]="S5.0E-86-10-8130";
-channelsnames[3342]="Viasat Xtra NHL8";
-channels[3342]="S5.0E-86-10-8140";
-channelsnames[3343]="TV11";
-channels[3343]="S5.0E-86-8-6000";
-channelsnames[3344]="TV 2 Filmkanalen";
-channels[3344]="S5.0E-86-8-6010";
-channelsnames[3345]="Ticket";
-channels[3345]="S5.0E-86-8-6020";
-channelsnames[3346]="MTV NO";
-channels[3346]="S5.0E-86-8-6040";
-channelsnames[3347]="Sjuan";
-channels[3347]="S5.0E-86-8-6080";
-channelsnames[3348]="TV4 Film";
-channels[3348]="S5.0E-86-8-6090";
-channelsnames[3349]="FEM";
-channels[3349]="S5.0E-86-21-3400";
-channelsnames[3350]="Viasat Fotboll";
-channels[3350]="S5.0E-86-21-3420";
-channelsnames[3351]="Nickelodeon DK / MTV Hits";
-channels[3351]="S5.0E-86-21-3450";
-channelsnames[3352]="Viasat Motor";
-channels[3352]="S5.0E-86-21-3430";
-channelsnames[3353]="Viasat Sport Norge";
-channels[3353]="S5.0E-86-21-3440";
-channelsnames[3354]="DR1";
-channels[3354]="S5.0E-86-9-7010";
-channelsnames[3355]="DR2";
-channels[3355]="S5.0E-86-9-7020";
-channelsnames[3356]="TV8";
-channels[3356]="S5.0E-86-9-7030";
-channelsnames[3357]="TV3 Puls";
-channels[3357]="S5.0E-86-9-7060";
-channelsnames[3358]="MTV DK";
-channels[3358]="S5.0E-86-9-7070";
-channelsnames[3359]="DR P1";
-channels[3359]="S5.0E-86-9-7210";
-channelsnames[3360]="DR P3";
-channels[3360]="S5.0E-86-9-7212";
-channelsnames[3361]="DR Klassisk";
-channels[3361]="S5.0E-86-9-7214";
-channelsnames[3362]="Emmanuel";
-channels[3362]="S5.0E-85-15-6500";
-channelsnames[3363]="NEWS ONE";
-channels[3363]="S5.0E-85-15-6510";
-channelsnames[3364]="1 Auto";
-channels[3364]="S5.0E-85-15-6520";
-channelsnames[3365]="RU MUSIC";
-channels[3365]="S5.0E-85-15-6530";
-channelsnames[3366]="Ukrainian Fashion";
-channels[3366]="S5.0E-85-15-6540";
-channelsnames[3367]="A-One UA";
-channels[3367]="S5.0E-85-15-6545";
-channelsnames[3368]="Dobro TV";
-channels[3368]="S5.0E-85-15-6555";
-channelsnames[3369]="Star TV UKR";
-channels[3369]="S5.0E-85-15-6560";
-channelsnames[3370]="PogodaTV";
-channels[3370]="S5.0E-85-15-6565";
-channelsnames[3371]="Business";
-channels[3371]="S5.0E-85-15-6580";
-channelsnames[3372]="YHT";
-channels[3372]="S5.0E-85-15-6585";
-channelsnames[3373]="SHOPping TV";
-channels[3373]="S5.0E-85-15-6590";
-channelsnames[3374]="SVT1 Nord";
-channels[3374]="S5.0E-86-11-2450";
-channelsnames[3375]="SVT1 Västerbotten";
-channels[3375]="S5.0E-86-11-2460";
-channelsnames[3376]="SVT1 Mitt";
-channels[3376]="S5.0E-86-11-2470";
-channelsnames[3377]="SVT1 Gävledala";
-channels[3377]="S5.0E-86-11-2480";
-channelsnames[3378]="SVT1 Värmland";
-channels[3378]="S5.0E-86-11-2490";
-channelsnames[3379]="SVT1 Tvärs";
-channels[3379]="S5.0E-86-11-2500";
-channelsnames[3380]="SVT1";
-channels[3380]="S5.0E-86-11-2510";
-channelsnames[3381]="SVT1 Öst";
-channels[3381]="S5.0E-86-11-2520";
-channelsnames[3382]="SVT1 Väst";
-channels[3382]="S5.0E-86-11-2530";
-channelsnames[3383]="SVT1 Småland";
-channels[3383]="S5.0E-86-11-2540";
-channelsnames[3384]="SVT1 Syd";
-channels[3384]="S5.0E-86-11-2550";
-channelsnames[3385]="SVT2 Nord";
-channels[3385]="S5.0E-86-11-2300";
-channelsnames[3386]="SVT2 Västerbotten";
-channels[3386]="S5.0E-86-11-2310";
-channelsnames[3387]="SVT2 Mitt";
-channels[3387]="S5.0E-86-11-2320";
-channelsnames[3388]="SVT2 Gävledala";
-channels[3388]="S5.0E-86-11-2330";
-channelsnames[3389]="SVT2 Värmland";
-channels[3389]="S5.0E-86-11-2340";
-channelsnames[3390]="SVT2 Tvärs";
-channels[3390]="S5.0E-86-11-2350";
-channelsnames[3391]="SVT2";
-channels[3391]="S5.0E-86-11-2360";
-channelsnames[3392]="SVT2 Öst";
-channels[3392]="S5.0E-86-11-2370";
-channelsnames[3393]="SVT2 Väst";
-channels[3393]="S5.0E-86-11-2380";
-channelsnames[3394]="SVT2 Småland";
-channels[3394]="S5.0E-86-11-2390";
-channelsnames[3395]="SVT2 Syd";
-channels[3395]="S5.0E-86-11-2400";
-channelsnames[3396]="Pro BCE";
-channels[3396]="S5.0E-85-17-6960";
-channelsnames[3397]="LALE";
-channels[3397]="S5.0E-85-17-6970";
+channelsnames[3240]="K75 International";
+channels[3240]="S5.0E-85-2-260";
+channelsnames[3241]="Dozhd TV";
+channels[3241]="S5.0E-85-2-270";
+channelsnames[3242]="Espreso TV";
+channels[3242]="S5.0E-85-2-280";
+channelsnames[3243]="Viasat Sport Sverige";
+channels[3243]="S5.0E-86-4-2100";
+channelsnames[3244]="TV3+";
+channels[3244]="S5.0E-86-4-2130";
+channelsnames[3245]="Viasat Hockey";
+channels[3245]="S5.0E-86-4-2140";
+channelsnames[3246]="Viasat 4";
+channels[3246]="S5.0E-86-4-2160";
+channelsnames[3247]="TV4 Fakta";
+channels[3247]="S5.0E-86-4-2180";
+channelsnames[3248]="TV3 Sverige";
+channels[3248]="S5.0E-86-3-1100";
+channelsnames[3249]="TV3 Norge";
+channels[3249]="S5.0E-86-3-1110";
+channelsnames[3250]="TV3 Denmark";
+channels[3250]="S5.0E-86-3-1120";
+channelsnames[3251]="Viasat Film";
+channels[3251]="S5.0E-86-3-1140";
+channelsnames[3252]="VFilm Action";
+channels[3252]="S5.0E-86-3-1150";
+channelsnames[3253]="TV6";
+channels[3253]="S5.0E-86-3-1160";
+channelsnames[3254]="Cartoon Network";
+channels[3254]="S5.0E-86-3-1170";
+channelsnames[3255]="VFilm Drama";
+channels[3255]="S5.0E-86-3-1195";
+channelsnames[3256]="1st Baltic Ch. Estonia";
+channels[3256]="S5.0E-85-13-6200";
+channelsnames[3257]="1st Baltic Ch. Latvia";
+channels[3257]="S5.0E-85-13-6210";
+channelsnames[3258]="Mir Baltic";
+channels[3258]="S5.0E-85-13-6260";
+channelsnames[3259]="Radio 101";
+channels[3259]="S5.0E-85-13-6275";
+channelsnames[3260]="VFilm Family";
+channels[3260]="S5.0E-86-5-3110";
+channelsnames[3261]="VFilm Comedy";
+channels[3261]="S5.0E-86-5-3120";
+channelsnames[3262]="VFilm Classic";
+channels[3262]="S5.0E-86-5-3130";
+channelsnames[3263]="Euronews";
+channels[3263]="S5.0E-86-7-5000";
+channelsnames[3264]="NHK World TV";
+channels[3264]="S5.0E-86-7-5010";
+channelsnames[3265]="Kunskapskanalen";
+channels[3265]="S5.0E-86-7-5020";
+channelsnames[3266]="SVTB/SVT24";
+channels[3266]="S5.0E-86-7-5030";
+channelsnames[3267]="Nat Geo Wild";
+channels[3267]="S5.0E-86-7-5080";
+channelsnames[3268]="TV 2 Bliss";
+channels[3268]="S5.0E-86-7-5050";
+channelsnames[3269]="TVNorge";
+channels[3269]="S5.0E-86-7-5040";
+channelsnames[3270]="TV4 Guld";
+channels[3270]="S5.0E-86-7-5060";
+channelsnames[3271]="NRK1 HD";
+channels[3271]="S5.0E-86-28-3515";
+channelsnames[3272]="NRK Tegnspråk";
+channels[3272]="S5.0E-86-28-1516";
+channelsnames[3273]="NRK1 Nordnytt";
+channels[3273]="S5.0E-86-28-1521";
+channelsnames[3274]="NRK1 Nordland";
+channels[3274]="S5.0E-86-28-3502";
+channelsnames[3275]="NRK1 Midtnytt";
+channels[3275]="S5.0E-86-28-3503";
+channelsnames[3276]="NRK1 Møre & Romsdal";
+channels[3276]="S5.0E-86-28-3504";
+channelsnames[3277]="NRK1 Vestlandsrevyen";
+channels[3277]="S5.0E-86-28-3505";
+channelsnames[3278]="NRK1 Rogaland";
+channels[3278]="S5.0E-86-28-3506";
+channelsnames[3279]="NRK1 Sørlandet";
+channels[3279]="S5.0E-86-28-3507";
+channelsnames[3280]="NRK1 Østafjells";
+channels[3280]="S5.0E-86-28-1520";
+channelsnames[3281]="NRK1 Østnytt";
+channels[3281]="S5.0E-86-28-3508";
+channelsnames[3282]="NRK1 Østfold";
+channels[3282]="S5.0E-86-28-3509";
+channelsnames[3283]="NRK P1";
+channels[3283]="S5.0E-86-28-1503";
+channelsnames[3284]="NRK P2";
+channels[3284]="S5.0E-86-28-1504";
+channelsnames[3285]="NRK P3";
+channels[3285]="S5.0E-86-28-1505";
+channelsnames[3286]="NRK Klassisk";
+channels[3286]="S5.0E-86-28-1507";
+channelsnames[3287]="NRK Sami Radio";
+channels[3287]="S5.0E-86-28-1510";
+channelsnames[3288]="NRK mP3";
+channels[3288]="S5.0E-86-28-1515";
+channelsnames[3289]="NRK Alltid Nyheter";
+channels[3289]="S5.0E-86-28-511";
+channelsnames[3290]="NRK P13";
+channels[3290]="S5.0E-86-28-3501";
+channelsnames[3291]="NRK Været til sjøs";
+channels[3291]="S5.0E-86-28-3511";
+channelsnames[3292]="NRK Super";
+channels[3292]="S5.0E-86-28-3513";
+channelsnames[3293]="NRK P1+";
+channels[3293]="S5.0E-86-28-3514";
+channelsnames[3294]="NRK Jazz";
+channels[3294]="S5.0E-86-28-3516";
+channelsnames[3295]="TV 2/Bornholm";
+channels[3295]="S5.0E-86-26-4670";
+channelsnames[3296]="TV 2/Fyn";
+channels[3296]="S5.0E-86-26-4640";
+channelsnames[3297]="TV 2/Lorry";
+channels[3297]="S5.0E-86-26-4660";
+channelsnames[3298]="TV 2/Midt-Vest";
+channels[3298]="S5.0E-86-26-4610";
+channelsnames[3299]="TV 2/Nord";
+channels[3299]="S5.0E-86-26-4600";
+channelsnames[3300]="TV 2/Syd";
+channels[3300]="S5.0E-86-26-4630";
+channelsnames[3301]="TV 2/Øst";
+channels[3301]="S5.0E-86-26-4650";
+channelsnames[3302]="TV 2/Østjylland";
+channels[3302]="S5.0E-86-26-4620";
+channelsnames[3303]="Bandit";
+channels[3303]="S5.0E-86-26-4690";
+channelsnames[3304]="Rix FM";
+channels[3304]="S5.0E-86-26-4692";
+channelsnames[3305]="P4 Lyden av Norge";
+channels[3305]="S5.0E-86-26-4694";
+channelsnames[3306]="Lugna Favoriter";
+channels[3306]="S5.0E-86-26-4696";
+channelsnames[3307]="Kanal 2";
+channels[3307]="S5.0E-85-52-2950";
+channelsnames[3308]="Kanal 11";
+channels[3308]="S5.0E-85-52-2960";
+channelsnames[3309]="ETV2";
+channels[3309]="S5.0E-85-52-2970";
+channelsnames[3310]="Golden Oldies";
+channels[3310]="S5.0E-86-22-3716";
+channelsnames[3311]="Jazz";
+channels[3311]="S5.0E-86-22-3718";
+channelsnames[3312]="Classic";
+channels[3312]="S5.0E-86-22-3722";
+channelsnames[3313]="Disco";
+channels[3313]="S5.0E-86-22-3724";
+channelsnames[3314]="Soul R&b";
+channels[3314]="S5.0E-86-22-3728";
+channelsnames[3315]="Super 80's";
+channels[3315]="S5.0E-86-22-3732";
+channelsnames[3316]="TV4";
+channels[3316]="S5.0E-86-22-3670";
+channelsnames[3317]="Comedy Central";
+channels[3317]="S5.0E-86-22-3660";
+channelsnames[3318]="Kanal 5";
+channels[3318]="S5.0E-86-22-3650";
+channelsnames[3319]="National Geographic (N)";
+channels[3319]="S5.0E-86-22-3640";
+channelsnames[3320]="TV10";
+channels[3320]="S5.0E-86-23-3800";
+channelsnames[3321]="Viasat Fotball";
+channels[3321]="S5.0E-86-23-3830";
+channelsnames[3322]="Boomerang";
+channels[3322]="S5.0E-86-23-3850";
+channelsnames[3323]="TV2 Zebra";
+channels[3323]="S5.0E-86-23-3820";
+channelsnames[3324]="TV4 Komedi";
+channels[3324]="S5.0E-86-23-3890";
+channelsnames[3325]="TV12";
+channels[3325]="S5.0E-86-23-3840";
+channelsnames[3326]="Kanal 5";
+channels[3326]="S5.0E-86-23-3880";
+channelsnames[3327]="TV4 Fakta XL";
+channels[3327]="S5.0E-86-23-3860";
+channelsnames[3328]="TV 2 Norge";
+channels[3328]="S5.0E-86-23-3810";
+channelsnames[3329]="TV1000 Premium";
+channels[3329]="S5.0E-85-18-6800";
+channelsnames[3330]="Lithuanian TV1";
+channels[3330]="S5.0E-85-18-6810";
+channelsnames[3331]="CANAL8 Sport";
+channels[3331]="S5.0E-86-24-4410";
+channelsnames[3332]="TV 2 Nyhetskanalen";
+channels[3332]="S5.0E-86-24-4450";
+channelsnames[3333]="dk4";
+channels[3333]="S5.0E-86-24-4470";
+channelsnames[3334]="TVN Chile Nordic";
+channels[3334]="S5.0E-86-6-4000";
+channelsnames[3335]="Visjon Norge";
+channels[3335]="S5.0E-86-6-4010";
+channelsnames[3336]="Kanal 10";
+channels[3336]="S5.0E-86-6-4050";
+channelsnames[3337]="GOD Channel";
+channels[3337]="S5.0E-86-6-4060";
+channelsnames[3338]="Viasat Xtra 8";
+channels[3338]="S5.0E-86-10-8110";
+channelsnames[3339]="Viasat Xtra 9";
+channels[3339]="S5.0E-86-10-8130";
+channelsnames[3340]="Viasat Xtra NHL8";
+channels[3340]="S5.0E-86-10-8140";
+channelsnames[3341]="TV11";
+channels[3341]="S5.0E-86-8-6000";
+channelsnames[3342]="TV 2 Filmkanalen";
+channels[3342]="S5.0E-86-8-6010";
+channelsnames[3343]="Ticket";
+channels[3343]="S5.0E-86-8-6020";
+channelsnames[3344]="MTV NO";
+channels[3344]="S5.0E-86-8-6040";
+channelsnames[3345]="Sjuan";
+channels[3345]="S5.0E-86-8-6080";
+channelsnames[3346]="TV4 Film";
+channels[3346]="S5.0E-86-8-6090";
+channelsnames[3347]="FEM";
+channels[3347]="S5.0E-86-21-3400";
+channelsnames[3348]="Viasat Fotboll";
+channels[3348]="S5.0E-86-21-3420";
+channelsnames[3349]="Nickelodeon DK / MTV Hits";
+channels[3349]="S5.0E-86-21-3450";
+channelsnames[3350]="Viasat Motor";
+channels[3350]="S5.0E-86-21-3430";
+channelsnames[3351]="Viasat Sport Norge";
+channels[3351]="S5.0E-86-21-3440";
+channelsnames[3352]="DR1";
+channels[3352]="S5.0E-86-9-7010";
+channelsnames[3353]="DR2";
+channels[3353]="S5.0E-86-9-7020";
+channelsnames[3354]="TV8";
+channels[3354]="S5.0E-86-9-7030";
+channelsnames[3355]="TV3 Puls";
+channels[3355]="S5.0E-86-9-7060";
+channelsnames[3356]="MTV DK";
+channels[3356]="S5.0E-86-9-7070";
+channelsnames[3357]="DR P1";
+channels[3357]="S5.0E-86-9-7210";
+channelsnames[3358]="DR P3";
+channels[3358]="S5.0E-86-9-7212";
+channelsnames[3359]="DR Klassisk";
+channels[3359]="S5.0E-86-9-7214";
+channelsnames[3360]="Emmanuel";
+channels[3360]="S5.0E-85-15-6500";
+channelsnames[3361]="NEWS ONE";
+channels[3361]="S5.0E-85-15-6510";
+channelsnames[3362]="1 Auto";
+channels[3362]="S5.0E-85-15-6520";
+channelsnames[3363]="RU MUSIC";
+channels[3363]="S5.0E-85-15-6530";
+channelsnames[3364]="Ukrainian Fashion";
+channels[3364]="S5.0E-85-15-6540";
+channelsnames[3365]="A-One UA";
+channels[3365]="S5.0E-85-15-6545";
+channelsnames[3366]="Dobro TV";
+channels[3366]="S5.0E-85-15-6555";
+channelsnames[3367]="Star TV UKR";
+channels[3367]="S5.0E-85-15-6560";
+channelsnames[3368]="PogodaTV";
+channels[3368]="S5.0E-85-15-6565";
+channelsnames[3369]="Business";
+channels[3369]="S5.0E-85-15-6580";
+channelsnames[3370]="YHT";
+channels[3370]="S5.0E-85-15-6585";
+channelsnames[3371]="SHOPping TV";
+channels[3371]="S5.0E-85-15-6590";
+channelsnames[3372]="SVT1 Nord";
+channels[3372]="S5.0E-86-11-2450";
+channelsnames[3373]="SVT1 Västerbotten";
+channels[3373]="S5.0E-86-11-2460";
+channelsnames[3374]="SVT1 Mitt";
+channels[3374]="S5.0E-86-11-2470";
+channelsnames[3375]="SVT1 Gävledala";
+channels[3375]="S5.0E-86-11-2480";
+channelsnames[3376]="SVT1 Värmland";
+channels[3376]="S5.0E-86-11-2490";
+channelsnames[3377]="SVT1 Tvärs";
+channels[3377]="S5.0E-86-11-2500";
+channelsnames[3378]="SVT1";
+channels[3378]="S5.0E-86-11-2510";
+channelsnames[3379]="SVT1 Öst";
+channels[3379]="S5.0E-86-11-2520";
+channelsnames[3380]="SVT1 Väst";
+channels[3380]="S5.0E-86-11-2530";
+channelsnames[3381]="SVT1 Småland";
+channels[3381]="S5.0E-86-11-2540";
+channelsnames[3382]="SVT1 Syd";
+channels[3382]="S5.0E-86-11-2550";
+channelsnames[3383]="SVT2 Nord";
+channels[3383]="S5.0E-86-11-2300";
+channelsnames[3384]="SVT2 Västerbotten";
+channels[3384]="S5.0E-86-11-2310";
+channelsnames[3385]="SVT2 Mitt";
+channels[3385]="S5.0E-86-11-2320";
+channelsnames[3386]="SVT2 Gävledala";
+channels[3386]="S5.0E-86-11-2330";
+channelsnames[3387]="SVT2 Värmland";
+channels[3387]="S5.0E-86-11-2340";
+channelsnames[3388]="SVT2 Tvärs";
+channels[3388]="S5.0E-86-11-2350";
+channelsnames[3389]="SVT2";
+channels[3389]="S5.0E-86-11-2360";
+channelsnames[3390]="SVT2 Öst";
+channels[3390]="S5.0E-86-11-2370";
+channelsnames[3391]="SVT2 Väst";
+channels[3391]="S5.0E-86-11-2380";
+channelsnames[3392]="SVT2 Småland";
+channels[3392]="S5.0E-86-11-2390";
+channelsnames[3393]="SVT2 Syd";
+channels[3393]="S5.0E-86-11-2400";
+channelsnames[3394]="Pro BCE";
+channels[3394]="S5.0E-85-17-6960";
+channelsnames[3395]="LALE";
+channels[3395]="S5.0E-85-17-6970";
channelsnames[3500]="DISCOVERY CHANNEL";
channels[3500]="S42.0E-42-55000-3601";
channelsnames[3501]="TV2";
-channels[3501]="S42.0E-66-3-35";
+channels[3501]="S42.0E-66-3-1303";
channelsnames[3502]="TRT BELGESEL";
channels[3502]="S42.0E-1-1-18";
channelsnames[3503]="KIDZ/ANIMEZ";
@@ -2467,62 +2423,62 @@ channels[3504]="S42.0E-42-502-14";
channelsnames[3505]="DUBLE TV";
channels[3505]="S42.0E-42-55-2800";
channelsnames[3506]="WORLD TRAVEL CHANNEL";
-channels[3506]="S42.0E-42-502-12";
-channelsnames[3507]="CNN TÜRK";
+channels[3506]="S42.0E-1070-41901-50702";
+channelsnames[3507]="CNN TÜRK OBSOLETE";
channels[3507]="S42.0E-66-3-1";
-channelsnames[3508]="EURO D";
+channelsnames[3508]="EURO D OBSOLETE";
channels[3508]="S42.0E-66-3-3";
-channelsnames[3509]="ONE SUPER TV";
+channelsnames[3509]="ONE SUPER TV OBSOLETE";
channels[3509]="S42.0E-66-3-4";
-channelsnames[3510]="BULUT TV";
+channelsnames[3510]="BULUT TV OBSOLETE";
channels[3510]="S42.0E-66-3-5";
-channelsnames[3511]="SUPERPOP TV";
+channelsnames[3511]="SUPERPOP TV OBSOLETE";
channels[3511]="S42.0E-66-3-6";
-channelsnames[3512]="KARIŞIK TV";
+channelsnames[3512]="KARIŞIK TV OBSOLETE";
channels[3512]="S42.0E-66-3-7";
-channelsnames[3513]="PİKSEL TV";
+channelsnames[3513]="PİKSEL TV OBSOLETE";
channels[3513]="S42.0E-66-3-8";
-channelsnames[3514]="ONE BAL TV";
+channelsnames[3514]="ONE BAL TV OBSOLETE";
channels[3514]="S42.0E-66-3-10";
-channelsnames[3515]="CNN TÜRK RADYO";
+channelsnames[3515]="CNN TÜRK RADYO OBSOLETE";
channels[3515]="S42.0E-66-3-11";
-channelsnames[3516]="RADYO D";
+channelsnames[3516]="RADYO D OBSOLETE";
channels[3516]="S42.0E-66-3-12";
channelsnames[3517]="MCJ MEDIASA";
channels[3517]="S42.0E-42-1089-2";
-channelsnames[3518]="SLOW TÜRK";
+channelsnames[3518]="SLOW TÜRK OBSOLETE";
channels[3518]="S42.0E-66-3-13";
-channelsnames[3519]="BEST FM";
+channelsnames[3519]="BEST FM OBSOLETE";
channels[3519]="S42.0E-66-3-14";
-channelsnames[3520]="PMC TV";
+channelsnames[3520]="PMC TV OBSOLETE";
channels[3520]="S42.0E-66-3-32";
-channelsnames[3521]="MÜZİK TÜRK";
+channelsnames[3521]="MÜZİK TÜRK OBSOLETE";
channels[3521]="S42.0E-66-3-33";
-channelsnames[3522]="HAZAN TV";
+channelsnames[3522]="HAZAN TV OBSOLETE";
channels[3522]="S42.0E-66-3-37";
-channelsnames[3523]="DHA FEED";
+channelsnames[3523]="DHA FEED OBSOLETE";
channels[3523]="S42.0E-66-3-41";
-channelsnames[3524]="PLANET ÇOCUK";
+channelsnames[3524]="PLANET ÇOCUK OBSOLETE";
channels[3524]="S42.0E-66-3-43";
-channelsnames[3525]="PLANET PEMBE";
+channelsnames[3525]="PLANET PEMBE OBSOLETE";
channels[3525]="S42.0E-66-3-44";
-channelsnames[3526]="PLANET MUTFAK";
+channelsnames[3526]="PLANET MUTFAK OBSOLETE";
channels[3526]="S42.0E-66-3-45";
-channelsnames[3527]="PLANET TÜRK";
+channelsnames[3527]="PLANET TÜRK OBSOLETE";
channels[3527]="S42.0E-66-3-46";
-channelsnames[3528]="NİSA TV";
+channelsnames[3528]="NİSA TV OBSOLETE";
channels[3528]="S42.0E-66-3-47";
-channelsnames[3529]="MEDYA TV";
+channelsnames[3529]="MEDYA TV OBSOLETE";
channels[3529]="S42.0E-66-3-48";
-channelsnames[3530]="DOGU TV";
+channelsnames[3530]="DOGU TV OBSOLETE";
channels[3530]="S42.0E-66-3-49";
-channelsnames[3531]="SERVICE 1";
+channelsnames[3531]="SERVICE 1 OBSOLETE";
channels[3531]="S42.0E-66-3-81";
-channelsnames[3532]="SERVICE 2";
+channelsnames[3532]="SERVICE 2 OBSOLETE";
channels[3532]="S42.0E-66-3-82";
-channelsnames[3533]="SERVICE 3";
+channelsnames[3533]="SERVICE 3 OBSOLETE";
channels[3533]="S42.0E-66-3-83";
-channelsnames[3534]="SERVICE 4";
+channelsnames[3534]="SERVICE 4 OBSOLETE";
channels[3534]="S42.0E-66-3-84";
channelsnames[3535]="TRT 1";
channels[3535]="S42.0E-1-1-1";
@@ -2686,7 +2642,7 @@ channelsnames[4007]="Polsat HD";
channels[4007]="S13.0E-113-7800-3107";
channelsnames[4008]="TV4";
channels[4008]="S13.0E-113-13200-13103";
-channelsnames[4009]="KUCHNIA+ HD";
+channelsnames[4009]="Kuchnia+ HD";
channels[4009]="S13.0E-318-1100-14237";
channelsnames[4010]="Polsat2";
channels[4010]="S13.0E-113-13200-13110";
@@ -2750,7 +2706,7 @@ channelsnames[4051]="HBO2 HD";
channels[4051]="S13.0E-318-11600-3593";
channelsnames[4052]="HBO COMEDY HD";
channels[4052]="S13.0E-318-11600-3594";
-channelsnames[4053]="ALE KINO+ HD";
+channelsnames[4053]="Ale kino+ HD";
channels[4053]="S13.0E-318-1100-14239";
channelsnames[4054]="FOX HD";
channels[4054]="S13.0E-113-7800-3111";
@@ -2806,476 +2762,468 @@ channelsnames[4507]="13 Ulica (Street) Poland";
channels[4507]="S13.0E-318-700-3";
channelsnames[4600]="teleTOON+ HD";
channels[4600]="S13.0E-318-1100-14205";
-channelsnames[4601]="PLANETE+ HD";
+channelsnames[4601]="Planete+ HD";
channels[4601]="S13.0E-318-1100-14206";
-channelsnames[4602]="KUCHNIA+ HD";
+channelsnames[4602]="Kuchnia+ HD";
channels[4602]="S13.0E-318-1100-14207";
-channelsnames[4603]="DOMO+ HD";
+channelsnames[4603]="Domo+ HD";
channels[4603]="S13.0E-318-1100-14208";
-channelsnames[4604]="ALE KINO+ HD";
+channelsnames[4604]="Ale kino+ HD";
channels[4604]="S13.0E-318-1100-14209";
channelsnames[4605]="teleTOON+ HD";
channels[4605]="S13.0E-318-1100-14235";
-channelsnames[4606]="PLANETE+ HD";
+channelsnames[4606]="Planete+ HD";
channels[4606]="S13.0E-318-1100-14236";
-channelsnames[4607]="DOMO+ HD";
+channelsnames[4607]="Domo+ HD";
channels[4607]="S13.0E-318-1100-14238";
-channelsnames[4608]="14281 test";
-channels[4608]="S13.0E-318-1100-14281";
-channelsnames[4609]="Polsat";
-channels[4609]="S13.0E-113-13200-13101";
-channelsnames[4610]="Polsat Play";
-channels[4610]="S13.0E-113-13200-13102";
-channelsnames[4611]="Polsat Sport";
-channels[4611]="S13.0E-113-13200-13104";
-channelsnames[4612]="Polsat Sport Extra";
-channels[4612]="S13.0E-113-13200-13105";
-channelsnames[4613]="Polsat Cafe";
-channels[4613]="S13.0E-113-13200-13106";
-channelsnames[4614]="Polsat Film";
-channels[4614]="S13.0E-113-13200-13108";
-channelsnames[4615]="Polsat News";
-channels[4615]="S13.0E-113-13200-13109";
-channelsnames[4616]="Polsat Play";
-channels[4616]="S13.0E-113-13200-13122";
-channelsnames[4617]="Polsat Cafe";
-channels[4617]="S13.0E-113-13200-13126";
-channelsnames[4618]="Polsat News";
-channels[4618]="S13.0E-113-13200-13139";
-channelsnames[4619]="CANAL+";
-channels[4619]="S13.0E-318-11900-4801";
-channelsnames[4620]="CANAL+ FILM";
-channels[4620]="S13.0E-318-11900-4802";
-channelsnames[4621]="CANAL+ FILM2";
-channels[4621]="S13.0E-318-11900-4803";
-channelsnames[4622]="KUCHNIA+";
-channels[4622]="S13.0E-318-11900-4804";
-channelsnames[4623]="ALE KINO+";
-channels[4623]="S13.0E-318-11900-4805";
-channelsnames[4624]="teleTOON+";
-channels[4624]="S13.0E-318-11900-4806";
-channelsnames[4625]="CANAL+ SPORT";
-channels[4625]="S13.0E-318-11900-4809";
-channelsnames[4626]="DOMO+";
-channels[4626]="S13.0E-318-11900-4811";
-channelsnames[4627]="4823";
-channels[4627]="S13.0E-318-11900-4823";
-channelsnames[4628]="H test 1";
-channels[4628]="S13.0E-318-11900-4830";
-channelsnames[4629]="H test 2";
-channels[4629]="S13.0E-318-11900-4831";
-channelsnames[4630]="H test 3";
-channels[4630]="S13.0E-318-11900-4832";
-channelsnames[4631]="CANAL+ FILM";
-channels[4631]="S13.0E-318-11900-4833";
-channelsnames[4632]="CANAL+ FILM2";
-channels[4632]="S13.0E-318-11900-4834";
-channelsnames[4633]="CANAL+";
-channels[4633]="S13.0E-318-11900-4835";
-channelsnames[4634]="CANAL+ FILM";
-channels[4634]="S13.0E-318-11900-4836";
-channelsnames[4635]="CANAL+ SPORT";
-channels[4635]="S13.0E-318-11900-4837";
-channelsnames[4636]="CYFRA+ RADIO";
-channels[4636]="S13.0E-318-11900-4840";
-channelsnames[4637]="CYFRA+ RMF";
-channels[4637]="S13.0E-318-11900-4842";
-channelsnames[4638]="CYFRA+ PR";
-channels[4638]="S13.0E-318-11900-4844";
-channelsnames[4639]="JASNA GORA";
-channels[4639]="S13.0E-318-11900-4845";
-channelsnames[4640]="CANAL+";
-channels[4640]="S13.0E-318-11900-4851";
-channelsnames[4641]="CANAL+ SPORT";
-channels[4641]="S13.0E-318-11900-4853";
-channelsnames[4642]="KUCHNIA+";
-channels[4642]="S13.0E-318-11900-4854";
-channelsnames[4643]="ALE KINO+";
-channels[4643]="S13.0E-318-11900-4855";
-channelsnames[4644]="teleTOON+";
-channels[4644]="S13.0E-318-11900-4856";
-channelsnames[4645]="DOMO+";
-channels[4645]="S13.0E-318-11900-4857";
-channelsnames[4646]="TOK FM";
-channels[4646]="S13.0E-318-11900-4862";
-channelsnames[4647]="tech 2";
-channels[4647]="S13.0E-318-11900-4863";
-channelsnames[4648]="KUCHNIA+";
-channels[4648]="S13.0E-318-11900-4864";
-channelsnames[4649]="DTV CABLE KU";
-channels[4649]="S13.0E-318-11900-4874";
-channelsnames[4650]="DTV CABLE AL";
-channels[4650]="S13.0E-318-11900-4875";
-channelsnames[4651]="DTV CABLE TT";
-channels[4651]="S13.0E-318-11900-4876";
-channelsnames[4652]="PR1";
-channels[4652]="S13.0E-318-11900-4881";
-channelsnames[4653]="PR2";
-channels[4653]="S13.0E-318-11900-4882";
-channelsnames[4654]="PR3";
-channels[4654]="S13.0E-318-11900-4883";
-channelsnames[4655]="Planete+";
-channels[4655]="S13.0E-318-11000-4406";
-channelsnames[4656]="MiniMini+";
-channels[4656]="S13.0E-318-11000-4407";
-channelsnames[4657]="nSport+";
-channels[4657]="S13.0E-318-11000-4408";
-channelsnames[4658]="HISTORY";
-channels[4658]="S13.0E-318-11000-4409";
-channelsnames[4659]="CANAL+ FAMILY2";
-channels[4659]="S13.0E-318-11000-4423";
-channelsnames[4660]="ESP";
-channels[4660]="S13.0E-318-11000-4435";
-channelsnames[4661]="Planete+";
-channels[4661]="S13.0E-318-11000-4451";
-channelsnames[4662]="MiniMini+";
-channels[4662]="S13.0E-318-11000-4452";
-channelsnames[4663]="nSport+";
-channels[4663]="S13.0E-318-11000-4458";
-channelsnames[4664]="DTV CABLE PL";
-channels[4664]="S13.0E-318-11000-4476";
-channelsnames[4665]="DTV CABLE MI";
-channels[4665]="S13.0E-318-11000-4477";
-channelsnames[4666]="STREFA ABONENTA nc+";
-channels[4666]="S13.0E-318-11000-4481";
-channelsnames[4667]="Test-R";
-channels[4667]="S19.2E-1-1051-28726";
-channelsnames[4668]="TVS";
-channels[4668]="S13.0E-318-1500-5102";
-channelsnames[4669]="KINO POLSKA";
-channels[4669]="S13.0E-318-1500-5104";
-channelsnames[4670]="TRACE TV";
-channels[4670]="S13.0E-318-1500-5105";
-channelsnames[4671]="5108";
-channels[4671]="S13.0E-318-1500-5108";
-channelsnames[4672]="TVP Regionalna";
-channels[4672]="S13.0E-318-1500-5115";
-channelsnames[4673]="ANIMAL PLANET";
-channels[4673]="S13.0E-318-1500-5122";
-channelsnames[4674]="CBS Drama";
-channels[4674]="S13.0E-318-1500-5126";
-channelsnames[4675]="CBS Reality";
-channels[4675]="S13.0E-318-1500-5127";
-channelsnames[4676]="TVP Kultura";
-channels[4676]="S13.0E-318-1500-5143";
-channelsnames[4677]="CINEMAX";
-channels[4677]="S13.0E-318-1500-5146";
-channelsnames[4678]="Boomerang CZ";
-channels[4678]="S23.5E-3-3202-6036";
-channelsnames[4679]="Animal Planet CZ";
-channels[4679]="S23.5E-3-3202-6041";
-channelsnames[4680]="EDGE";
-channels[4680]="S23.5E-3-3202-6111";
-channelsnames[4681]="EDGE CZ";
-channels[4681]="S23.5E-3-3202-6151";
-channelsnames[4682]="Polsat Romans";
-channels[4682]="S13.0E-113-7400-7301";
-channelsnames[4683]="AXN White";
-channels[4683]="S13.0E-113-7400-7302";
-channelsnames[4684]="AXN Black";
-channels[4684]="S13.0E-113-7400-7303";
-channelsnames[4685]="Fightbox";
-channels[4685]="S13.0E-113-7400-7304";
-channelsnames[4686]="Extreme Sports";
-channels[4686]="S13.0E-113-7400-7305";
-channelsnames[4687]="Eurosport";
-channels[4687]="S13.0E-113-7400-7306";
-channelsnames[4688]="Nat Geo Wild";
-channels[4688]="S13.0E-113-7400-7307";
+channelsnames[4608]="Polsat";
+channels[4608]="S13.0E-113-13200-13101";
+channelsnames[4609]="Polsat Play";
+channels[4609]="S13.0E-113-13200-13102";
+channelsnames[4610]="Polsat Sport";
+channels[4610]="S13.0E-113-13200-13104";
+channelsnames[4611]="Polsat Sport Extra";
+channels[4611]="S13.0E-113-13200-13105";
+channelsnames[4612]="Polsat Cafe";
+channels[4612]="S13.0E-113-13200-13106";
+channelsnames[4613]="Polsat Film";
+channels[4613]="S13.0E-113-13200-13108";
+channelsnames[4614]="Polsat News";
+channels[4614]="S13.0E-113-13200-13109";
+channelsnames[4615]="Polsat Play";
+channels[4615]="S13.0E-113-13200-13122";
+channelsnames[4616]="Polsat Cafe";
+channels[4616]="S13.0E-113-13200-13126";
+channelsnames[4617]="Polsat News";
+channels[4617]="S13.0E-113-13200-13139";
+channelsnames[4618]="CANAL+";
+channels[4618]="S13.0E-318-11900-4801";
+channelsnames[4619]="CANAL+ FILM";
+channels[4619]="S13.0E-318-11900-4802";
+channelsnames[4620]="CANAL+ FILM2";
+channels[4620]="S13.0E-318-11900-4803";
+channelsnames[4621]="Kuchnia+";
+channels[4621]="S13.0E-318-11900-4804";
+channelsnames[4622]="Ale kino+";
+channels[4622]="S13.0E-318-11900-4805";
+channelsnames[4623]="teleTOON+";
+channels[4623]="S13.0E-318-11900-4806";
+channelsnames[4624]="CANAL+ SPORT";
+channels[4624]="S13.0E-318-11900-4809";
+channelsnames[4625]="Domo+";
+channels[4625]="S13.0E-318-11900-4811";
+channelsnames[4626]="4823";
+channels[4626]="S13.0E-318-11900-4823";
+channelsnames[4627]="H test 1";
+channels[4627]="S13.0E-318-11900-4830";
+channelsnames[4628]="H test 2";
+channels[4628]="S13.0E-318-11900-4831";
+channelsnames[4629]="H test 3";
+channels[4629]="S13.0E-318-11900-4832";
+channelsnames[4630]="CANAL+ FILM";
+channels[4630]="S13.0E-318-11900-4833";
+channelsnames[4631]="CANAL+ FILM2";
+channels[4631]="S13.0E-318-11900-4834";
+channelsnames[4632]="CANAL+";
+channels[4632]="S13.0E-318-11900-4835";
+channelsnames[4633]="CANAL+ FILM";
+channels[4633]="S13.0E-318-11900-4836";
+channelsnames[4634]="CANAL+ SPORT";
+channels[4634]="S13.0E-318-11900-4837";
+channelsnames[4635]="CYFRA+ RADIO";
+channels[4635]="S13.0E-318-11900-4840";
+channelsnames[4636]="CYFRA+ RMF";
+channels[4636]="S13.0E-318-11900-4842";
+channelsnames[4637]="CYFRA+ PR";
+channels[4637]="S13.0E-318-11900-4844";
+channelsnames[4638]="JASNA GORA";
+channels[4638]="S13.0E-318-11900-4845";
+channelsnames[4639]="CANAL+";
+channels[4639]="S13.0E-318-11900-4851";
+channelsnames[4640]="CANAL+ SPORT";
+channels[4640]="S13.0E-318-11900-4853";
+channelsnames[4641]="Kuchnia+";
+channels[4641]="S13.0E-318-11900-4854";
+channelsnames[4642]="Ale kino+";
+channels[4642]="S13.0E-318-11900-4855";
+channelsnames[4643]="teleTOON+";
+channels[4643]="S13.0E-318-11900-4856";
+channelsnames[4644]="Domo+";
+channels[4644]="S13.0E-318-11900-4857";
+channelsnames[4645]="TOK FM";
+channels[4645]="S13.0E-318-11900-4862";
+channelsnames[4646]="tech 2";
+channels[4646]="S13.0E-318-11900-4863";
+channelsnames[4647]="Kuchnia+";
+channels[4647]="S13.0E-318-11900-4864";
+channelsnames[4648]="DTV CABLE KU";
+channels[4648]="S13.0E-318-11900-4874";
+channelsnames[4649]="DTV CABLE AL";
+channels[4649]="S13.0E-318-11900-4875";
+channelsnames[4650]="DTV CABLE TT";
+channels[4650]="S13.0E-318-11900-4876";
+channelsnames[4651]="PR1";
+channels[4651]="S13.0E-318-11900-4881";
+channelsnames[4652]="PR2";
+channels[4652]="S13.0E-318-11900-4882";
+channelsnames[4653]="PR3";
+channels[4653]="S13.0E-318-11900-4883";
+channelsnames[4654]="Planete+";
+channels[4654]="S13.0E-318-11000-4406";
+channelsnames[4655]="MiniMini+";
+channels[4655]="S13.0E-318-11000-4407";
+channelsnames[4656]="nSport+";
+channels[4656]="S13.0E-318-11000-4408";
+channelsnames[4657]="HISTORY";
+channels[4657]="S13.0E-318-11000-4409";
+channelsnames[4658]="CANAL+ FAMILY2";
+channels[4658]="S13.0E-318-11000-4423";
+channelsnames[4659]="ESP";
+channels[4659]="S13.0E-318-11000-4435";
+channelsnames[4660]="Planete+";
+channels[4660]="S13.0E-318-11000-4451";
+channelsnames[4661]="MiniMini+";
+channels[4661]="S13.0E-318-11000-4452";
+channelsnames[4662]="nSport+";
+channels[4662]="S13.0E-318-11000-4458";
+channelsnames[4663]="DTV CABLE PL";
+channels[4663]="S13.0E-318-11000-4476";
+channelsnames[4664]="DTV CABLE MI";
+channels[4664]="S13.0E-318-11000-4477";
+channelsnames[4665]="STREFA ABONENTA nc+";
+channels[4665]="S13.0E-318-11000-4481";
+channelsnames[4666]="Test-R";
+channels[4666]="S19.2E-1-1051-28726";
+channelsnames[4667]="TVS";
+channels[4667]="S13.0E-318-1500-5102";
+channelsnames[4668]="KINO POLSKA";
+channels[4668]="S13.0E-318-1500-5104";
+channelsnames[4669]="TRACE TV";
+channels[4669]="S13.0E-318-1500-5105";
+channelsnames[4670]="5108";
+channels[4670]="S13.0E-318-1500-5108";
+channelsnames[4671]="TVP Regionalna";
+channels[4671]="S13.0E-318-1500-5115";
+channelsnames[4672]="ANIMAL PLANET";
+channels[4672]="S13.0E-318-1500-5122";
+channelsnames[4673]="CBS Drama";
+channels[4673]="S13.0E-318-1500-5126";
+channelsnames[4674]="CBS Reality";
+channels[4674]="S13.0E-318-1500-5127";
+channelsnames[4675]="TVP Kultura";
+channels[4675]="S13.0E-318-1500-5143";
+channelsnames[4676]="CINEMAX";
+channels[4676]="S13.0E-318-1500-5146";
+channelsnames[4677]="Boomerang CZ";
+channels[4677]="S23.5E-3-3202-6036";
+channelsnames[4678]="Animal Planet CZ";
+channels[4678]="S23.5E-3-3202-6041";
+channelsnames[4679]="EDGE";
+channels[4679]="S23.5E-3-3202-6111";
+channelsnames[4680]="EDGE CZ";
+channels[4680]="S23.5E-3-3202-6151";
+channelsnames[4681]="Polsat Romans";
+channels[4681]="S13.0E-113-7400-7301";
+channelsnames[4682]="AXN White";
+channels[4682]="S13.0E-113-7400-7302";
+channelsnames[4683]="AXN Black";
+channels[4683]="S13.0E-113-7400-7303";
+channelsnames[4684]="Fightbox";
+channels[4684]="S13.0E-113-7400-7304";
+channelsnames[4685]="Extreme Sports";
+channels[4685]="S13.0E-113-7400-7305";
+channelsnames[4686]="Eurosport";
+channels[4686]="S13.0E-113-7400-7306";
+channelsnames[4687]="Nat Geo Wild";
+channels[4687]="S13.0E-113-7400-7307";
+channelsnames[4688]="Disco Polo Music";
+channels[4688]="S13.0E-113-7400-7308";
channelsnames[4689]="Disco Polo Music";
-channels[4689]="S13.0E-113-7400-7308";
-channelsnames[4690]="Disco Polo Music";
-channels[4690]="S13.0E-113-7400-7310";
-channelsnames[4691]="Discovery";
-channels[4691]="S13.0E-113-7400-7315";
-channelsnames[4692]="AXN";
-channels[4692]="S13.0E-113-7400-7318";
-channelsnames[4693]="Disney XD";
-channels[4693]="S13.0E-113-7400-7349";
-channelsnames[4694]="Polsat Viasat Explore";
-channels[4694]="S13.0E-113-7400-7371";
-channelsnames[4695]="Polsat Viasat History";
-channels[4695]="S13.0E-113-7400-7372";
-channelsnames[4696]="Polsat Viasat Nature";
-channels[4696]="S13.0E-113-7400-7373";
-channelsnames[4697]="D. SCIENCE";
-channels[4697]="S13.0E-318-11400-15701";
-channelsnames[4698]="Discovery Turbo Xtra";
-channels[4698]="S13.0E-318-11400-15703";
-channelsnames[4699]="TVP SPORT";
-channels[4699]="S13.0E-318-11400-15704";
-channelsnames[4700]="TELE5";
-channels[4700]="S13.0E-318-11400-15705";
-channelsnames[4701]="POLONIA1";
-channels[4701]="S13.0E-318-11400-15706";
-channelsnames[4702]="CINEMAX 2";
-channels[4702]="S13.0E-318-11400-15707";
-channelsnames[4703]="NATIONAL GEO";
-channels[4703]="S13.0E-318-11400-15710";
-channelsnames[4704]="Orange Sport";
-channels[4704]="S13.0E-318-11400-15711";
-channelsnames[4705]="DISCOVERY";
-channels[4705]="S13.0E-318-11400-15716";
-channelsnames[4706]="TVP Seriale";
-channels[4706]="S13.0E-318-11400-15728";
-channelsnames[4707]="DISCOVERY";
-channels[4707]="S13.0E-318-11400-15736";
-channelsnames[4708]="MTV Polska";
-channels[4708]="S13.0E-318-12800-2";
-channelsnames[4709]="CC Family";
-channels[4709]="S13.0E-318-12800-4";
-channelsnames[4710]="VIVA Polska";
-channels[4710]="S13.0E-318-12800-5";
-channelsnames[4711]="Viacom Blink!";
-channels[4711]="S13.0E-318-12800-6";
-channelsnames[4712]="VH1";
-channels[4712]="S13.0E-318-12800-7";
-channelsnames[4713]="Comedy Central Polska";
-channels[4713]="S13.0E-318-12800-10";
-channelsnames[4714]="Nickelodeon";
-channels[4714]="S13.0E-318-12800-11";
-channelsnames[4715]="MTV Live HD";
-channels[4715]="S13.0E-318-12800-21";
-channelsnames[4716]="MTV Polska.";
-channels[4716]="S13.0E-318-12800-22";
-channelsnames[4717]="CC Family.";
-channels[4717]="S13.0E-318-12800-24";
-channelsnames[4718]="VIVA Polska.";
-channels[4718]="S13.0E-318-12800-25";
-channelsnames[4719]="Comedy Central Polska.";
-channels[4719]="S13.0E-318-12800-30";
-channelsnames[4720]="VIVA Polska..";
-channels[4720]="S13.0E-318-12800-45";
-channelsnames[4721]="Starz TV";
-channels[4721]="S28.2E-2-2314-53335";
-channelsnames[4722]="?TV";
-channels[4722]="S28.2E-2-2314-53361";
-channelsnames[4723]="True Ent+1";
-channels[4723]="S28.2E-2-2314-53371";
-channelsnames[4724]="BBC Knowledge Poland";
-channels[4724]="S13.0E-318-13000-14603";
-channelsnames[4725]="BBC Lifestyle Poland";
-channels[4725]="S13.0E-318-13000-14604";
-channelsnames[4726]="BBC CBeebies Poland";
-channels[4726]="S13.0E-318-13000-14605";
-channelsnames[4727]="Discovery ID Poland";
-channels[4727]="S13.0E-318-13000-14612";
-channelsnames[4728]="TLC Poland";
-channels[4728]="S13.0E-318-13000-14613";
-channelsnames[4729]="Loveworld";
-channels[4729]="S13.0E-318-13000-14606";
-channelsnames[4730]="BBC Arabic TV";
-channels[4730]="S13.0E-318-13000-14616";
-channelsnames[4731]="BBC Arabic Radio";
-channels[4731]="S13.0E-318-13000-14617";
-channelsnames[4732]="BBC English (Europe)";
-channels[4732]="S13.0E-318-13000-14618";
-channelsnames[4733]="BBC English Mid-East";
-channels[4733]="S13.0E-318-13000-14619";
-channelsnames[4734]="Polsat Volleyball 1";
-channels[4734]="S13.0E-113-7900-10500";
-channelsnames[4735]="Polsat Food";
-channels[4735]="S13.0E-113-7900-10501";
-channelsnames[4736]="Boomerang";
-channels[4736]="S13.0E-113-7900-10502";
-channelsnames[4737]="Radio ZET Gold";
-channels[4737]="S13.0E-113-7900-10503";
-channelsnames[4738]="Radio ZET Gold";
-channels[4738]="S13.0E-113-7900-10504";
-channelsnames[4739]="MTV Rocks";
-channels[4739]="S13.0E-113-7900-10505";
-channelsnames[4740]="CBS Europa";
-channels[4740]="S13.0E-113-7900-10507";
-channelsnames[4741]="Polsat Jim Jam";
-channels[4741]="S13.0E-113-7900-10508";
-channelsnames[4742]="ATM Rozrywka TV";
-channels[4742]="S13.0E-113-7900-10511";
-channelsnames[4743]="Polsat Sport News";
-channels[4743]="S13.0E-113-7900-10514";
-channelsnames[4744]="Blue Hustler";
-channels[4744]="S13.0E-113-7900-10516";
-channelsnames[4745]="Zlote Przeboje";
-channels[4745]="S13.0E-113-7900-10519";
-channelsnames[4746]="Travel";
-channels[4746]="S13.0E-113-7900-10520";
-channelsnames[4747]="RMF FM";
-channels[4747]="S13.0E-113-7900-10523";
-channelsnames[4748]="Zlote Przeboje";
-channels[4748]="S13.0E-113-7900-10524";
-channelsnames[4749]="RMF Classic";
-channels[4749]="S13.0E-113-7900-10526";
-channelsnames[4750]="Radio PIN 102FM";
-channels[4750]="S13.0E-113-7900-10527";
-channelsnames[4751]="Jedynka - PR";
-channels[4751]="S13.0E-113-7900-10528";
-channelsnames[4752]="Trójka - PR";
-channels[4752]="S13.0E-113-7900-10529";
-channelsnames[4753]="Radio ZET";
-channels[4753]="S13.0E-113-7900-10530";
-channelsnames[4754]="Radio ZET";
-channels[4754]="S13.0E-113-7900-10531";
-channelsnames[4755]="RMF Classic";
-channels[4755]="S13.0E-113-7900-10532";
-channelsnames[4756]="Trójka - PR";
-channels[4756]="S13.0E-113-7900-10535";
-channelsnames[4757]="Radio PIN 102FM";
-channels[4757]="S13.0E-113-7900-10536";
-channelsnames[4758]="Jedynka - PR";
-channels[4758]="S13.0E-113-7900-10537";
-channelsnames[4759]="RMF FM";
-channels[4759]="S13.0E-113-7900-10538";
-channelsnames[4760]="RMF MAXXX";
-channels[4760]="S13.0E-113-7900-10543";
-channelsnames[4761]="RMF MAXXX";
-channels[4761]="S13.0E-113-7900-10549";
-channelsnames[4762]="Disney Junior";
-channels[4762]="S13.0E-113-7900-10552";
-channelsnames[4763]="Dla Abonentow";
-channels[4763]="S13.0E-113-7900-10556";
-channelsnames[4764]="CN/TCM";
-channels[4764]="S13.0E-318-12200-7457";
-channelsnames[4765]="Noursat";
-channels[4765]="S13.0E-318-12200-7402";
-channelsnames[4766]="Al Hiwar";
-channels[4766]="S13.0E-318-12200-7456";
-channelsnames[4767]="DMC";
-channels[4767]="S13.0E-318-12200-7459";
-channelsnames[4768]="Miracle TV";
-channels[4768]="S13.0E-318-12200-7460";
-channelsnames[4769]="Test";
-channels[4769]="S13.0E-318-12200-7461";
-channelsnames[4770]="Al Forat";
-channels[4770]="S13.0E-318-12200-7463";
-channelsnames[4771]="Al Fady";
-channels[4771]="S13.0E-318-12200-7464";
-channelsnames[4772]="Disney Channel";
-channels[4772]="S13.0E-318-12200-7466";
-channelsnames[4773]="Cartoon Network";
-channels[4773]="S13.0E-318-12200-7467";
-channelsnames[4774]="Turner Classic Movies";
-channels[4774]="S13.0E-318-12200-7468";
-channelsnames[4775]="RFI Persian";
-channels[4775]="S13.0E-318-12200-7469";
-channelsnames[4776]="Sat 7 Pars";
-channels[4776]="S13.0E-318-12200-7470";
-channelsnames[4777]="Velayat TV";
-channels[4777]="S13.0E-318-12200-7471";
-channelsnames[4778]="Karbala Satellite Channel";
-channels[4778]="S13.0E-318-12200-7472";
-channelsnames[4779]="iTV";
-channels[4779]="S13.0E-318-12200-7473";
-channelsnames[4780]="Al Maaref";
-channels[4780]="S13.0E-318-12200-7474";
-channelsnames[4781]="STS International";
-channels[4781]="S13.0E-318-12200-7475";
-channelsnames[4782]="Ahl E Bait";
-channels[4782]="S13.0E-318-12200-7476";
-channelsnames[4783]="Cancao Nova";
-channels[4783]="S13.0E-318-200-4922";
-channelsnames[4784]="ESP2 Dutch";
-channels[4784]="S13.0E-318-200-13802";
-channelsnames[4785]="ESP2 Test";
-channels[4785]="S13.0E-318-200-13804";
-channelsnames[4786]="ESP2 Greek";
-channels[4786]="S13.0E-318-200-13805";
-channelsnames[4787]="ESP2 Portuguese";
-channels[4787]="S13.0E-318-200-13821";
-channelsnames[4788]="ESP2 Italy";
-channels[4788]="S13.0E-318-200-13822";
-channelsnames[4789]="ESP2 Biava";
-channels[4789]="S13.0E-318-200-13823";
-channelsnames[4790]="ESP Spain";
-channels[4790]="S13.0E-318-200-13829";
-channelsnames[4791]="ESP Italy";
-channels[4791]="S13.0E-318-200-13830";
-channelsnames[4792]="ESP Polish";
-channels[4792]="S13.0E-318-200-13834";
-channelsnames[4793]="ESP Portuguese";
-channels[4793]="S13.0E-318-200-13836";
-channelsnames[4794]="ESP Hungarian";
-channels[4794]="S13.0E-318-200-13837";
-channelsnames[4795]="ESP Czech";
-channels[4795]="S13.0E-318-200-13839";
-channelsnames[4796]="ESP Greek";
-channels[4796]="S13.0E-318-200-13840";
-channelsnames[4797]="ESP Cyprus";
-channels[4797]="S13.0E-318-200-13841";
-channelsnames[4798]="ESP Bulgarian";
-channels[4798]="S13.0E-318-200-13842";
-channelsnames[4799]="ESP2 Turk";
-channels[4799]="S13.0E-318-200-13843";
-channelsnames[4800]="ESP Serbia";
-channels[4800]="S13.0E-318-200-13844";
-channelsnames[4801]="ESP Turk";
-channels[4801]="S13.0E-318-200-13845";
-channelsnames[4802]="ESP2 German";
-channels[4802]="S13.0E-318-200-13846";
-channelsnames[4803]="ESP2 Serbia";
-channels[4803]="S13.0E-318-200-13847";
-channelsnames[4804]="ESP Biava";
-channels[4804]="S13.0E-318-200-13848";
-channelsnames[4805]="EUROSPORT2 PL";
-channels[4805]="S13.0E-318-200-13864";
-channelsnames[4806]="EUROSPORT PL";
-channels[4806]="S13.0E-318-200-13865";
-channelsnames[4807]="ESP2 NE Intl";
-channels[4807]="S13.0E-318-200-13877";
-channelsnames[4808]="ESP2 NE Polish";
-channels[4808]="S13.0E-318-200-13878";
-channelsnames[4809]="ESP2 NE Bulgarian";
-channels[4809]="S13.0E-318-200-13879";
-channelsnames[4810]="ESP2 NE Serbian";
-channels[4810]="S13.0E-318-200-13880";
-channelsnames[4811]="ESP2 NE Czech";
-channels[4811]="S13.0E-318-200-13881";
-channelsnames[4812]="ESP2 NE Danish";
-channels[4812]="S13.0E-318-200-13882";
-channelsnames[4813]="ESP2 NE Swedish";
-channels[4813]="S13.0E-318-200-13884";
-channelsnames[4814]="ESP ECH";
-channels[4814]="S13.0E-318-200-13885";
-channelsnames[4815]="ESP2 NE UPC";
-channels[4815]="S13.0E-318-200-13886";
-channelsnames[4816]="ESP2 NE Hungary";
-channels[4816]="S13.0E-318-200-13887";
-channelsnames[4817]="ESP2 NE Romania";
-channels[4817]="S13.0E-318-200-13888";
-channelsnames[4818]="ESP UPC";
-channels[4818]="S13.0E-318-200-13889";
-channelsnames[4819]="ESP2 NE Norwegian";
-channels[4819]="S13.0E-318-200-13890";
-channelsnames[4820]="ESP2 NE Dutch";
-channels[4820]="S13.0E-318-200-13891";
-channelsnames[4821]="ESP Romanian";
-channels[4821]="S13.0E-318-200-13892";
-channelsnames[4822]="A3";
-channels[4822]="S13.0E-318-200-13940";
-channelsnames[4823]="Canal Algerie";
-channels[4823]="S13.0E-318-200-13950";
-channelsnames[4824]="TV5MONDE FBS";
-channels[4824]="S13.0E-318-13100-7321";
-channelsnames[4825]="TV5MONDE EUROPE";
-channels[4825]="S13.0E-318-13100-7322";
-channelsnames[4826]="Crime and Investigation nc+";
-channels[4826]="S13.0E-318-13100-7324";
-channelsnames[4827]="Crime + Investigation";
-channels[4827]="S13.0E-318-13100-7325";
-channelsnames[4828]="Kurdistan TV";
-channels[4828]="S13.0E-318-13100-7326";
-channelsnames[4829]="GEM TV";
-channels[4829]="S13.0E-318-13100-7333";
-channelsnames[4830]="AB Channel";
-channels[4830]="S13.0E-318-13100-7334";
-channelsnames[4831]="Kurd Channel";
-channels[4831]="S13.0E-318-13100-7335";
-channelsnames[4832]="NUMBER 1";
-channels[4832]="S13.0E-318-13100-7337";
-channelsnames[4833]="Radio Expert";
-channels[4833]="S13.0E-318-13100-7339";
-channelsnames[4834]="Fadak TV OBSOLETE";
-channels[4834]="S13.0E-318-13100-7341";
-channelsnames[4835]="Manoto 1";
-channels[4835]="S13.0E-318-13100-7355";
+channels[4689]="S13.0E-113-7400-7310";
+channelsnames[4690]="Discovery";
+channels[4690]="S13.0E-113-7400-7315";
+channelsnames[4691]="AXN";
+channels[4691]="S13.0E-113-7400-7318";
+channelsnames[4692]="Disney XD";
+channels[4692]="S13.0E-113-7400-7349";
+channelsnames[4693]="Polsat Viasat Explore";
+channels[4693]="S13.0E-113-7400-7371";
+channelsnames[4694]="Polsat Viasat History";
+channels[4694]="S13.0E-113-7400-7372";
+channelsnames[4695]="Polsat Viasat Nature";
+channels[4695]="S13.0E-113-7400-7373";
+channelsnames[4696]="D. SCIENCE";
+channels[4696]="S13.0E-318-11400-15701";
+channelsnames[4697]="Discovery Turbo Xtra";
+channels[4697]="S13.0E-318-11400-15703";
+channelsnames[4698]="TVP SPORT";
+channels[4698]="S13.0E-318-11400-15704";
+channelsnames[4699]="TELE5";
+channels[4699]="S13.0E-318-11400-15705";
+channelsnames[4700]="POLONIA1";
+channels[4700]="S13.0E-318-11400-15706";
+channelsnames[4701]="CINEMAX 2";
+channels[4701]="S13.0E-318-11400-15707";
+channelsnames[4702]="NATIONAL GEO";
+channels[4702]="S13.0E-318-11400-15710";
+channelsnames[4703]="Orange Sport";
+channels[4703]="S13.0E-318-11400-15711";
+channelsnames[4704]="POLSAT VOLLEYBALL 4";
+channels[4704]="S13.0E-318-11400-15716";
+channelsnames[4705]="TVP Seriale";
+channels[4705]="S13.0E-318-11400-15728";
+channelsnames[4706]="MTV Polska";
+channels[4706]="S13.0E-318-12800-2";
+channelsnames[4707]="CC Family";
+channels[4707]="S13.0E-318-12800-4";
+channelsnames[4708]="VIVA Polska";
+channels[4708]="S13.0E-318-12800-5";
+channelsnames[4709]="Viacom Blink!";
+channels[4709]="S13.0E-318-12800-6";
+channelsnames[4710]="VH1";
+channels[4710]="S13.0E-318-12800-7";
+channelsnames[4711]="Comedy Central Polska";
+channels[4711]="S13.0E-318-12800-10";
+channelsnames[4712]="Nickelodeon";
+channels[4712]="S13.0E-318-12800-11";
+channelsnames[4713]="MTV Live HD";
+channels[4713]="S13.0E-318-12800-21";
+channelsnames[4714]="MTV Polska.";
+channels[4714]="S13.0E-318-12800-22";
+channelsnames[4715]="CC Family.";
+channels[4715]="S13.0E-318-12800-24";
+channelsnames[4716]="VIVA Polska.";
+channels[4716]="S13.0E-318-12800-25";
+channelsnames[4717]="Comedy Central Polska.";
+channels[4717]="S13.0E-318-12800-30";
+channelsnames[4718]="VIVA Polska..";
+channels[4718]="S13.0E-318-12800-45";
+channelsnames[4719]="Starz TV";
+channels[4719]="S28.2E-2-2314-53335";
+channelsnames[4720]="?TV";
+channels[4720]="S28.2E-2-2314-53361";
+channelsnames[4721]="True Ent+1";
+channels[4721]="S28.2E-2-2314-53371";
+channelsnames[4722]="BBC Knowledge Poland";
+channels[4722]="S13.0E-318-13000-14603";
+channelsnames[4723]="BBC Lifestyle Poland";
+channels[4723]="S13.0E-318-13000-14604";
+channelsnames[4724]="BBC CBeebies Poland";
+channels[4724]="S13.0E-318-13000-14605";
+channelsnames[4725]="Discovery ID Poland";
+channels[4725]="S13.0E-318-13000-14612";
+channelsnames[4726]="TLC Poland";
+channels[4726]="S13.0E-318-13000-14613";
+channelsnames[4727]="Loveworld";
+channels[4727]="S13.0E-318-13000-14606";
+channelsnames[4728]="BBC Arabic TV";
+channels[4728]="S13.0E-318-13000-14616";
+channelsnames[4729]="BBC Arabic Radio";
+channels[4729]="S13.0E-318-13000-14617";
+channelsnames[4730]="BBC English (Europe)";
+channels[4730]="S13.0E-318-13000-14618";
+channelsnames[4731]="BBC English Mid-East";
+channels[4731]="S13.0E-318-13000-14619";
+channelsnames[4732]="TEST 1";
+channels[4732]="S13.0E-113-7900-10500";
+channelsnames[4733]="Polsat Food";
+channels[4733]="S13.0E-113-7900-10501";
+channelsnames[4734]="Boomerang";
+channels[4734]="S13.0E-113-7900-10502";
+channelsnames[4735]="Radio ZET Gold";
+channels[4735]="S13.0E-113-7900-10503";
+channelsnames[4736]="Radio ZET Gold";
+channels[4736]="S13.0E-113-7900-10504";
+channelsnames[4737]="MTV Rocks";
+channels[4737]="S13.0E-113-7900-10505";
+channelsnames[4738]="CBS Europa";
+channels[4738]="S13.0E-113-7900-10507";
+channelsnames[4739]="Polsat Jim Jam";
+channels[4739]="S13.0E-113-7900-10508";
+channelsnames[4740]="ATM Rozrywka TV";
+channels[4740]="S13.0E-113-7900-10511";
+channelsnames[4741]="Polsat Sport News";
+channels[4741]="S13.0E-113-7900-10514";
+channelsnames[4742]="Blue Hustler";
+channels[4742]="S13.0E-113-7900-10516";
+channelsnames[4743]="Zlote Przeboje";
+channels[4743]="S13.0E-113-7900-10519";
+channelsnames[4744]="Travel";
+channels[4744]="S13.0E-113-7900-10520";
+channelsnames[4745]="RMF FM";
+channels[4745]="S13.0E-113-7900-10523";
+channelsnames[4746]="Zlote Przeboje";
+channels[4746]="S13.0E-113-7900-10524";
+channelsnames[4747]="RMF Classic";
+channels[4747]="S13.0E-113-7900-10526";
+channelsnames[4748]="Radio PIN 102FM";
+channels[4748]="S13.0E-113-7900-10527";
+channelsnames[4749]="Jedynka - PR";
+channels[4749]="S13.0E-113-7900-10528";
+channelsnames[4750]="Trójka - PR";
+channels[4750]="S13.0E-113-7900-10529";
+channelsnames[4751]="Radio ZET";
+channels[4751]="S13.0E-113-7900-10530";
+channelsnames[4752]="Radio ZET";
+channels[4752]="S13.0E-113-7900-10531";
+channelsnames[4753]="RMF Classic";
+channels[4753]="S13.0E-113-7900-10532";
+channelsnames[4754]="Trójka - PR";
+channels[4754]="S13.0E-113-7900-10535";
+channelsnames[4755]="Radio PIN 102FM";
+channels[4755]="S13.0E-113-7900-10536";
+channelsnames[4756]="Jedynka - PR";
+channels[4756]="S13.0E-113-7900-10537";
+channelsnames[4757]="RMF FM";
+channels[4757]="S13.0E-113-7900-10538";
+channelsnames[4758]="RMF MAXXX";
+channels[4758]="S13.0E-113-7900-10543";
+channelsnames[4759]="RMF MAXXX";
+channels[4759]="S13.0E-113-7900-10549";
+channelsnames[4760]="Disney Junior";
+channels[4760]="S13.0E-113-7900-10552";
+channelsnames[4761]="Dla Abonentow";
+channels[4761]="S13.0E-113-7900-10556";
+channelsnames[4762]="CN/TCM";
+channels[4762]="S13.0E-318-12200-7457";
+channelsnames[4763]="Noursat";
+channels[4763]="S13.0E-318-12200-7402";
+channelsnames[4764]="Al Hiwar";
+channels[4764]="S13.0E-318-12200-7456";
+channelsnames[4765]="DMC";
+channels[4765]="S13.0E-318-12200-7459";
+channelsnames[4766]="Miracle TV";
+channels[4766]="S13.0E-318-12200-7460";
+channelsnames[4767]="BRAZZERS TV Europe";
+channels[4767]="S13.0E-318-12200-7461";
+channelsnames[4768]="Al Forat";
+channels[4768]="S13.0E-318-12200-7463";
+channelsnames[4769]="Al Fady";
+channels[4769]="S13.0E-318-12200-7464";
+channelsnames[4770]="Disney Channel";
+channels[4770]="S13.0E-318-12200-7466";
+channelsnames[4771]="Cartoon Network";
+channels[4771]="S13.0E-318-12200-7467";
+channelsnames[4772]="Turner Classic Movies";
+channels[4772]="S13.0E-318-12200-7468";
+channelsnames[4773]="RFI Persian";
+channels[4773]="S13.0E-318-12200-7469";
+channelsnames[4774]="Sat 7 Pars";
+channels[4774]="S13.0E-318-12200-7470";
+channelsnames[4775]="Velayat TV";
+channels[4775]="S13.0E-318-12200-7471";
+channelsnames[4776]="Karbala Satellite Channel";
+channels[4776]="S13.0E-318-12200-7472";
+channelsnames[4777]="iTV";
+channels[4777]="S13.0E-318-12200-7473";
+channelsnames[4778]="Al Maaref";
+channels[4778]="S13.0E-318-12200-7474";
+channelsnames[4779]="STS International";
+channels[4779]="S13.0E-318-12200-7475";
+channelsnames[4780]="Ahl E Bait";
+channels[4780]="S13.0E-318-12200-7476";
+channelsnames[4781]="Cancao Nova";
+channels[4781]="S13.0E-318-200-4922";
+channelsnames[4782]="ESP2 Dutch";
+channels[4782]="S13.0E-318-200-13802";
+channelsnames[4783]="ESP2 Test";
+channels[4783]="S13.0E-318-200-13804";
+channelsnames[4784]="ESP2 Greek";
+channels[4784]="S13.0E-318-200-13805";
+channelsnames[4785]="ESP2 Portuguese";
+channels[4785]="S13.0E-318-200-13821";
+channelsnames[4786]="ESP2 Italy";
+channels[4786]="S13.0E-318-200-13822";
+channelsnames[4787]="ESP2 Biava";
+channels[4787]="S13.0E-318-200-13823";
+channelsnames[4788]="ESP Spain";
+channels[4788]="S13.0E-318-200-13829";
+channelsnames[4789]="ESP Italy";
+channels[4789]="S13.0E-318-200-13830";
+channelsnames[4790]="ESP Polish";
+channels[4790]="S13.0E-318-200-13834";
+channelsnames[4791]="ESP Portuguese";
+channels[4791]="S13.0E-318-200-13836";
+channelsnames[4792]="ESP Hungarian";
+channels[4792]="S13.0E-318-200-13837";
+channelsnames[4793]="ESP Czech";
+channels[4793]="S13.0E-318-200-13839";
+channelsnames[4794]="ESP Greek";
+channels[4794]="S13.0E-318-200-13840";
+channelsnames[4795]="ESP Cyprus";
+channels[4795]="S13.0E-318-200-13841";
+channelsnames[4796]="ESP Bulgarian";
+channels[4796]="S13.0E-318-200-13842";
+channelsnames[4797]="ESP2 Turk";
+channels[4797]="S13.0E-318-200-13843";
+channelsnames[4798]="ESP Serbia";
+channels[4798]="S13.0E-318-200-13844";
+channelsnames[4799]="ESP Turk";
+channels[4799]="S13.0E-318-200-13845";
+channelsnames[4800]="ESP2 German";
+channels[4800]="S13.0E-318-200-13846";
+channelsnames[4801]="ESP2 Serbia";
+channels[4801]="S13.0E-318-200-13847";
+channelsnames[4802]="ESP Biava";
+channels[4802]="S13.0E-318-200-13848";
+channelsnames[4803]="EUROSPORT2 PL";
+channels[4803]="S13.0E-318-200-13864";
+channelsnames[4804]="EUROSPORT PL";
+channels[4804]="S13.0E-318-200-13865";
+channelsnames[4805]="ESP2 NE Intl";
+channels[4805]="S13.0E-318-200-13877";
+channelsnames[4806]="ESP2 NE Polish";
+channels[4806]="S13.0E-318-200-13878";
+channelsnames[4807]="ESP2 NE Bulgarian";
+channels[4807]="S13.0E-318-200-13879";
+channelsnames[4808]="ESP2 NE Serbian";
+channels[4808]="S13.0E-318-200-13880";
+channelsnames[4809]="ESP2 NE Czech";
+channels[4809]="S13.0E-318-200-13881";
+channelsnames[4810]="ESP2 NE Danish";
+channels[4810]="S13.0E-318-200-13882";
+channelsnames[4811]="ESP2 NE Swedish";
+channels[4811]="S13.0E-318-200-13884";
+channelsnames[4812]="ESP ECH";
+channels[4812]="S13.0E-318-200-13885";
+channelsnames[4813]="ESP2 NE UPC";
+channels[4813]="S13.0E-318-200-13886";
+channelsnames[4814]="ESP2 NE Hungary";
+channels[4814]="S13.0E-318-200-13887";
+channelsnames[4815]="ESP2 NE Romania";
+channels[4815]="S13.0E-318-200-13888";
+channelsnames[4816]="ESP UPC";
+channels[4816]="S13.0E-318-200-13889";
+channelsnames[4817]="ESP2 NE Norwegian";
+channels[4817]="S13.0E-318-200-13890";
+channelsnames[4818]="ESP2 NE Dutch";
+channels[4818]="S13.0E-318-200-13891";
+channelsnames[4819]="ESP Romanian";
+channels[4819]="S13.0E-318-200-13892";
+channelsnames[4820]="A3";
+channels[4820]="S13.0E-318-200-13940";
+channelsnames[4821]="Canal Algerie";
+channels[4821]="S13.0E-318-200-13950";
+channelsnames[4822]="TV5MONDE FBS";
+channels[4822]="S13.0E-318-13100-7321";
+channelsnames[4823]="TV5MONDE EUROPE";
+channels[4823]="S13.0E-318-13100-7322";
+channelsnames[4824]="Crime and Investigation nc+";
+channels[4824]="S13.0E-318-13100-7324";
+channelsnames[4825]="Crime + Investigation";
+channels[4825]="S13.0E-318-13100-7325";
+channelsnames[4826]="GEM TV";
+channels[4826]="S13.0E-318-13100-7333";
+channelsnames[4827]="AB Channel";
+channels[4827]="S13.0E-318-13100-7334";
+channelsnames[4828]="Kurd Channel";
+channels[4828]="S13.0E-318-13100-7335";
+channelsnames[4829]="NUMBER 1";
+channels[4829]="S13.0E-318-13100-7337";
+channelsnames[4830]="Radio Expert";
+channels[4830]="S13.0E-318-13100-7339";
+channelsnames[4831]="Manoto 1";
+channels[4831]="S13.0E-318-13100-7355";
channelsnames[5000]="BBC Olym 4 HD";
channels[5000]="S28.2E-0-0-8900";
channelsnames[5001]="BBC Olym 4 HD";
@@ -3414,7 +3362,7 @@ channelsnames[8019]="Canvas";
channels[8019]="T-8720-2213-34";
channelsnames[8020]="24Kitchen";
channels[8020]="T-8720-2212-26";
-channelsnames[8021]="13th Street";
+channelsnames[8021]="FOX";
channels[8021]="T-8720-2244-42";
channelsnames[8022]="CNN";
channels[8022]="T-8720-2244-45";
@@ -3637,13 +3585,13 @@ minChan[1] = 1001;
maxChan[1] = 1967;
baseChn[1] = 1000;
minChan[2] = 2000;
-maxChan[2] = 2230;
+maxChan[2] = 2228;
baseChn[2] = 2000;
minChan[3] = 3000;
maxChan[3] = 3607;
baseChn[3] = 3000;
minChan[4] = 4001;
-maxChan[4] = 4835;
+maxChan[4] = 4831;
baseChn[4] = 4000;
minChan[5] = 5000;
maxChan[5] = 5100;
@@ -3668,4 +3616,4 @@ defChan[6] = 6001; protChn[6] = 1;
defChan[7] = 7000; protChn[7] = 0;
defChan[8] = 8001; protChn[8] = 0;
defChan[9] = 9051; protChn[9] = 0;
-Chan_Ver = "09/05/14 02:33:43" ;
+Chan_Ver = "10/18/14 14:24:53" ;
diff --git a/index.html b/index.html
index ce94f72..a79ea1e 100644
--- a/index.html
+++ b/index.html
@@ -3,6 +3,7 @@
<script type="text/javascript" src="settings.js" />
<script type="text/javascript" src="lang_eng.js" />
<script type="text/javascript" src="channels.js" />
+ <script type="text/javascript" src="main.js" />
</head>
<script language="Javascript">
@@ -16,5159 +17,6 @@
// this stuff is worth it, you can buy me a beer in return
//
-window.onkeydown = onKeyDown;
-
-function onLoad() {
-
- is = toi.informationService;
- ss = toi.schedulerService;
- aos = toi.audioOutputService;
- vos = toi.videoOutputService;
- fps = toi.frontPanelService;
- ams = toi.assetManagerService;
-
- GetSettings();
- createPlayer();
- createEitCache();
-
- if(pipPlayer){
- addPipVideoplane();
- createPip();
- }
- if(PipSwitchGuide){
- createPip();
- }
-
- embedTeletextPlugin();
- aos.setVolume(AudioOut, StartVolume);
- aos.setMuteState(AudioOut, false);
- showDisplay(Right(currChan.toString(),4), false, 100, 0 );
- play(channels[currChan]);
-
- if (EPGMode) {
- eitCache.setFilterMode(eitCache.FILTER_MODE_PF_AND_SCHEDULE);
- } else {
- eitCache.setFilterMode(eitCache.FILTER_MODE_PF_ONLY);
- }
- eitCache.addEventListener(eitCache.ON_CACHE_UPDATED, onCacheUpdated);
- mediaPlayer.addEventListener(mediaPlayer.ON_DATA_AVAILABLE,onDataAvailableEvent);
- mediaPlayer.addEventListener(mediaPlayer.ON_STATE_CHANGED, MPD);
-
- if (is.getObject("var.capabilities.dvr") == "FALSE") {
- mediaRecorder = 0;
- // No harddisk, no recorder functions possible
- }
-
- if (is.getObject("config.architecture.target") !== "vip1903" && fullupdate !== 2) {
- fullupdate = 0;
- // No 19x3 so better turn fullupdate EPG off
- }
-
- if (mediaRecorder) {
- createRecorder();
- mediaRecorder.addEventListener(mediaRecorder.ON_STATE_CHANGED, onRecorderStateChanged);
- om = toi.assetManagerService.getAssetOperationManager(); //toi.OperationManager;
- rma = om.createOperation("Remove Asset");
- }
-
- is.addEventListener(is.ON_OBJECTS_CHANGED, onEvent);
- is.subscribeObject(onEvent, "var.io.state", true);
-
- ss.addEventListener(ss.ON_SCHEDULED_START, onScheduledStart);
- ss.addEventListener(ss.ON_SCHEDULED_STOP, onScheduledStop);
- ss.setCategorySubscription(onScheduledStart, "*");
- ss.setCategorySubscription(onScheduledStop, "*");
-
- setOSDscale();
- SetupFonts();
-
- setOSDtimer();
- showOSD();
- videoplane.subtitles = Boolean(ShowSubs);
- colorkeys.innerHTML = "<font color=red> " + NN[4] + " </font><font color=green > " + NN[1] + " </font><font color=yellow> " + NN[2] + " </font><font color=blue> " + NN[5] + " </font>";
- medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[0] + "</center></h1>";
-}
-
-function SetupFonts() {
-//setup fontsize
- colorkeys.style.fontSize = fsKeys;
- osdvolume.style.fontSize = fsCA;
- osdtime.style.fontSize = fsTime;
- osdname.style.fontSize = fsName;
- osdepg.style.fontSize = fsEpg;
- osdca.style.fontSize = fsCA;
- switchtimer.style.fontSize = fsEpg;
- osdepginfo.style.fontSize = fsEpginfo;
- osdepginfonext.style.fontSize = fsEpginfo;
- osdnr.style.fontSize = fsChan;
- osdlang.style.fontSize = fsAudio;
-//setup fontcolors/ backgroundcolor
- document.body.style.backgroundColor = "#ccc";
- osdvolume.style.color = "green";
- osdtime.style.color = "white";
- osdname.style.color = "black";
- osdepg.style.color = "white";
- osdca.style.color = "black";
- switchtimer.style.color = "white";
- switchtimer.style.background = DefaultBGColor;
- osdnr.style.background = "red";
- var i = "#3366ff";
- osdmedia.style.background = i;
- osdmain.style.background = i;
- schedule.style.background = i;
- mainmenu.style.background = i;
- medialist.style.background = i;
- osdepginfo.style.background = i;
- osdepginfonext.style.background = i;
- channellist.style.background = "#bbb";
- osdnr.style.color = "black";
- osdlang.style.color = "white";
-}
-
-
-function GetSettings() {
- //test for settings, create if not excists.
- try {
- if (!is.getObject("vip.serveraddress")) {}
- } catch(e) {
- is.setObject("vip.serveraddress","0",is.STORAGE_PERMANENT)
- }
-
- try {
- if (!is.getObject("vip.languagepriority")) {}
- } catch(e) {
- is.setObject("vip.languagepriority","0",is.STORAGE_PERMANENT)
- }
-
- try {
- if (!is.getObject("vip.OSDlanguage")) {}
- } catch(e) {
- is.setObject("vip.OSDlanguage","0",is.STORAGE_PERMANENT)
- }
-
- try {
- if (!is.getObject("vip.testing")) {}
- } catch(e) {
- is.setObject("vip.testing","0",is.STORAGE_PERMANENT)
- }
-
-
- try {
- if (!is.getObject("vip.resolution")) {}
- } catch(e) {
- is.setObject("vip.resolution","2",is.STORAGE_PERMANENT)
- }
-
- try {
- if (!is.getObject("vip.testing2")) {}
- } catch(e) {
- is.setObject("vip.testing2","0",is.STORAGE_PERMANENT)
- //show info if channel is on hardcoded list of non free
- }
-
- try {
- if (!is.getObject("vip.fav_max_channel")) {}
- } catch(e) {
- is.setObject("vip.fav_max_channel","0",is.STORAGE_PERMANENT)
- }
-
- try {
- if (!is.getObject("vip.showsubs")) {}
- } catch(e) {
- is.setObject("vip.showsubs","1",is.STORAGE_PERMANENT)
- }
-
-
- var sel_group;
- for (var i=0;i<10;i++) {
- sel_group = "vip.group." + i;
- try {
- if (!is.getObject(sel_group)) {}
- } catch(e) {
- if (!minChan[i]) {
- is.setObject(sel_group,"0",is.STORAGE_PERMANENT)
- } else {
- is.setObject(sel_group,"1",is.STORAGE_PERMANENT)
- }
- }
- }
-
- for (var i=0;i<10;i++) {
- if (minChan[i]) {minchan[i] = minChan[i];}
- sel_group = "vip.group." + i;
- if (is.getObject(sel_group) == "0") { minChan[i] = "";}
- }
-
- audio = Number(is.getObject("vip.languagepriority"));
- server_ip = server_ip_array[Number(is.getObject("vip.serveraddress"))];
- for (var i=0;i<10;i++) { if (ServerAdres[i] !== "FullURL" && ServerAdres[i] !== "MultiCast") {ServerAdres[i] = server_ip + StreamPort;} }
- ServerAdres[Fav_group] = server_ip + StreamPort;
-
- lang_nr = Number(is.getObject("vip.OSDlanguage"));
- loadjs(langfile[lang_nr]);
-
- experimental = Number(is.getObject("vip.testing"));// Use some experimental code
- testing2 = Number(is.getObject("vip.testing2"));// Use some experimental code
- ShowSubs = Number(is.getObject("vip.showsubs"));
-
- Set_Res = Number(is.getObject("vip.resolution"));
- VideoOutput();
- Read_Fav();
-
- is.setObject("cfg.media.subtitling.languagepriority",subs_prio,is.STORAGE_PERMANENT);
- // set default subtitle language to
-
-
- //if needed types can be set here. Default of the box is normal.
- //is.setObject("cfg.media.subtitling.typepriority","hearing_impaired",is.STORAGE_PERMANENT);
- //is.setObject("cfg.media.subtitling.typepriority","normal",is.STORAGE_PERMANENT);
- //is.setObject("cfg.media.audio.typepriority","normal",is.STORAGE_PERMANENT);
- //is.setObject("cfg.media.audio.typepriority","hearing_impaired",is.STORAGE_PERMANENT);
- //is.setObject("cfg.media.audio.typepriority","visually_impaired",is.STORAGE_PERMANENT);
-
-
- for (var x = 0; x < 10; x++) {
- searchtimers[x] = "" ; // To solve displaying undefined
- timers[x] = "" ;
- if (maxChan[x]) { //check changed to maxChan because minChan can be unset from menu
- for (var i = minChan[x]; i < (maxChan[x]+1); i++) {
- EPG[0][4][i] = "";EPG[1][4][i] = "";EPG[0][5][i] = "";EPG[1][5][i] = "";
- EPG[0][7][i] = "";EPG[1][7][i] = "";AvInfo[i] = "";
- }
- }
- }
- for (var i = minChan[Fav_group]; i < (maxChan[Fav_group]+10); i++) {
- EPG[0][4][i] = "";EPG[1][4][i] = "";EPG[0][5][i] = "";EPG[1][5][i] = "";EPG[0][7][i] = "";EPG[1][7][i] = "";AvInfo[i] = "";
- }
- //Check if there is a SmartTV or Restfulapi VDR server plugin but not when box ip isn't the same range as server ip
- test_ip = server_ip.split(".");
- box_ip = (is.getObject("config.ipaddress")).split(".");
-
- if (("http://" + box_ip[0] == test_ip[0]) && (box_ip[1] == test_ip[1]) && (box_ip[2] == test_ip[2])) {
- CheckPlugins();
- }
-
-// override check for testing :
-// smartTVplugin = 0 ;
-// Restfulapiplugin = 1;
- if (smartTVplugin && Restfulapiplugin == 0) {
- // smartTVplugin YES
- // Restfulapiplugin NO
- get_timer = 1;
- if (get_recordings == 0 ) {get_recordings = 1;}
- get_marks = 1;
- } else if (smartTVplugin == 0 && Restfulapiplugin) {
- // smartTVplugin NO
- // Restfulapiplugin YES
- get_timer = 0;
- if (get_recordings == 1 ) {get_recordings = 0;}
- get_marks = 0;
- } else if (smartTVplugin == 0 && Restfulapiplugin == 0) {
- // smartTVplugin NO
- // Restfulapiplugin NO
- get_recordings = 2; //from streamdev
- }
-}
-
-function loadjs(filename){
- var oHead = document.getElementsByTagName('HEAD').item(0);
- var oScript= document.createElement("script");
- oScript.type = "text/javascript";
- oScript.src= filename;
- oHead.appendChild( oScript);
-}
-
-function onEvent(event) {
-var numObjs = event.objectNames.length;
- for (var i=0; i<numObjs; i++) {
- if(event.objectNames[i] == "var.io.state" && is.getObject(event.objectNames[i]) == "standby" && KillStream == 1){
- try {
- if (isMediaMenu) {
- if (medialist.style.opacity == 0) {setResume();} // No mediamenu on screen so set resume.
- }
- mediaPlayer.close();
- SetLed(2,2,0);// At request no more blinking on standby.
-
- } catch(e) {
- alert(e);
- }
- } else if(event.objectNames[i] == "var.io.state" && is.getObject(event.objectNames[i]) == "normal" && KillStream == 1){
- play(channels[currChan]);
- if(isMediaMenu) {
- if (mediaList.style.opacity == 0) {
- if (get_recordings == 1) {
- setTimeout("GetMarks(); getResume(); playRec(recLink[currMed]+ '?mode=streamtoend&time=' + position);",100);
- } else if (get_recordings == 2) {
- setTimeout("playRec(recLink[currMed]+ '?pos=time.' + position);",100);
- }
-
- } else {
- showDisplay("STOP", false, 100, 0 );
- showMediaList();
- }
- }
- }
- }
-}
-
-function onUnload() {
- try {
- mediaPlayer.close();
- mediaPlayer.releaseInstance();
- if(TimeShift){
- mediaPlayer.stopTimeshiftBuffering();
- mediaPlayer.discardTimeshiftBuffer();
- }
- if(mediaRecorder){
- om.releaseOperation(rma);
- mediaRecorder.close();
- mediaRecorder.releaseInstance();
- }
- if(pipPlayer){
- pipPlayer.close();
- pipPlayer.releaseInstance();
- }
-
- is.removeEventListener(is.ON_OBJECTS_CHANGED, onEvent);
- eitCache.removeEventListener(eitCache.ON_CACHE_UPDATED, onCacheUpdated);
- mediaPlayer.removeEventListener(mediaPlayer.ON_DATA_AVAILABLE,onDataAvailableEvent);
- mediaPlayer.removeEventListener(mediaPlayer.ON_STATE_CHANGED, MPD);
- mediaRecorder.removeEventListener(mediaRecorder.ON_STATE_CHANGED, onRecorderStateChanged);
-
- } catch(e) {
- alert(e);
- }
-}
-
-function incChan(step) {
- currChan += step;
- if (currChan > maxChan[ChanGroup]) {
- currChan = minChan[ChanGroup];
- }
- osdnr.style.opacity = isFullscreen;
- OSDchannr(currChan);
-}
-
-function decChan(step) {
- currChan -= step;
- if (currChan < minChan[ChanGroup] ) {
- currChan = maxChan[ChanGroup] ;
- }
- osdnr.style.opacity = isFullscreen;
- OSDchannr(currChan);
-}
-
-function VolumeUp() {
- if (Volume < 5) {
- var VolStep = 1;
- } else {
- var VolStep = VolumeStep;
- }
-
- Volume += VolStep;
- if (Volume > 100) {
- Volume = 100;
- }
- aos.setVolume(AudioOut, Volume);
- showVolume();
-}
-
-function VolumeDown() {
- if (Volume > 5) {
- var VolStep = VolumeStep;
- } else {
- var VolStep = 1;
- }
-
- Volume -= VolStep;
- if (Volume < 0) {
- Volume = 0;
- }
- aos.setVolume(AudioOut, Volume);
- showVolume();
-}
-
-
-function VolumeMute() {
- state = aos.getMuteState(AudioOut);
- aos.setMuteState(AudioOut, !state);
- mute = 1 - state;
- osdmute.style.opacity = mute;
-}
-
-function createEitCache() {
- try {
- eitCache = toi.dvbEitService.createInstance();
- } catch(e) {
- alert("Failed getting eitCache: " + e);
- }
-}
-
-function createPlayer() {
- try {
- mediaPlayer = toi.mediaService.createPlayerInstance();
- } catch(e) {
- alert("Failed creating player: " + e);
- }
-}
-
-
-function createRecorder() {
- try {
- mediaRecorder = toi.mediaService.createRecorderInstance();
- } catch(e) {
- alert("Cannot create media recorder: " + e);
- mediaRecorder = "";
- }
-}
-
-function createPip() {
- try {
- pipPlayer = toi.mediaService.createPipPlayerInstance();
- } catch(e) {
- alert("Failed creating PIP player: " + e);
- }
-}
-
-
-function addPipVideoplane() {
- var pipVideoDiv = document.getElementById("pipVideoDiv");
- pipVideoDiv.innerHTML = "<videoplane id='pipvideoplane' index=1 style='position:fixed;left:70%;top:60%;height:20%;width:20%;z-index:50;'></videoplane>";
- document.body.appendChild(pipVideoDiv);
-}
-
-function pipplay(uri) {
-try {
- if (pipPlayer.getState() != pipPlayer.STATE_IDLE) {
- pipPlayer.close();
- }
- if (PIPDelayID != -1) { clearTimeout(PIPDelayID); PIPDelayID = -1; }
-
- if (ServerAdres[ChanGroup] == "MultiCast" ) {
- SI=channels[currChan].split("-");
- uri = SI[4];
- } else if (ServerAdres[ChanGroup] == "FullURL" ) {
- // uri = ready!
- } else {
- uri = ServerAdres[ChanGroup] + uri;
- }
- pipPlayer.open(uri);
- PIPDelayID = setTimeout("pipPlayer.play(1000);", 500);
- } catch (e) {
- alert("Failed opening PIP stream: " + e);
- return;
- }
-}
-
-
-function play(uri) {
- try {
- if (initialDelayID != -1) { clearTimeout(initialDelayID); initialDelayID = -1; }
- if (PlayDelayID != -1) { clearTimeout(PlayDelayID); PlayDelayID = -1; }
- if (initialDelayPlayID != -1) { clearTimeout(initialDelayPlayID); initialDelayPlayID = -1; }
-
- if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) { mediaPlayer.close(); }
- if (isSchedule) { schedule.style.opacity = 0; isSchedule = 0;}
- if (epgactive) { osdepginfo.style.opacity = 0; osdepginfonext.style.opacity = 0; epgactive = 0;}
-
- if (ServerAdres[ChanGroup] == "MultiCast" ) { SI=channels[currChan].split("-"); uri = SI[4];
- } else if (ServerAdres[ChanGroup] == "FullURL" ) { // uri = ready!
- } else { uri = ServerAdres[ChanGroup] + uri; }
-
- URL = uri;
- initialDelayPlayID = setTimeout("mediaPlayer.open(URL);mediaPlayer.play(1000);GetEPG(currChan);ExtraStuff();",initialDelayPlay);
- initialDelayPlay = 500; // wait 500 ms before zap to next channel
- PlayDelayID = setTimeout("initialDelayPlay = 0;",5000);
- SetLed(1,1,0);
-
- if(isFullscreen) { showOSD(); }
-
- showDisplay(Right(currChan.toString(),4), false, 100, 0 );
-
- } catch (e) {
- alert("Failed opening stream: " + e);
- return;
- }
-}
-
-function preview(urip) {
- if(SwitchGuide) {
- play(urip);
- } else if (PipSwitchGuide && fullupdate) {
- pipplay(urip);
- }
-
- if (isSchedule) { schedule.style.opacity = 0; isSchedule = 0;}
- if (epgactive) { osdepginfo.style.opacity = 0; osdepginfonext.style.opacity = 0; epgactive = 0;}
- showChannelList();
-}
-
-
-function onDataAvailableEvent(event) {
- dataAvailable = event.status;
- //alert("onDataAvailableEvent : " + event.status);
- if(event.status==true) {
- updateStreamInfo(currChan);
- }
-}
-
-
-function updateStreamInfo(currStream) {
-
-var streamInfo = mediaPlayer.getStreamInfo();
-var cList = streamInfo.availableComponents;
-var x;
-var xs = 0;
-var subs = "";
-if (currMed!= -1) {
- if (streamInfo.playTime != -1) {
- recDura[currMed] = streamInfo.playTime;
- }
-}
-xx = 0;
-AvInfo[currStream] = "";
-lang_prio_dyn.length = 0;
-subs_prio_dyn.length = 0;
-Radioicon = "\uE00E";
-
-for(x=0; x<cList.length;x++) {
- if(cList[x].type == 0) {
- lang_prio_dyn[xx] = mediaPlayer.getAudioStreamInfo(cList[x]).language;
- AvInfo[currStream] = AvInfo[currStream] + " Audio " + xx + " " + mediaPlayer.getAudioStreamInfo(cList[x]).encoding + " - " + mediaPlayer.getAudioStreamInfo(cList[x]).language + " , ";
-
- //
-// alert (mediaPlayer.getAudioStreamInfo(cList[x]).sampleRate);
-// alert (mediaPlayer.getAudioStreamInfo(cList[x]).channelFormat);
- // AUDIO_CHANNEL_FORMAT_UNKNOWN = 0
- // AUDIO_CHANNEL_FORMAT_SINGLE_MONO = 1
- // AUDIO_CHANNEL_FORMAT_DUAL_MONO = 2
- // AUDIO_CHANNEL_FORMAT_STEREO = 3
- // AUDIO_CHANNEL_FORMAT_3_FRONT_1_BACK = 4
- // AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK = 5
- // AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK_LFE = 6
- // AUDIO_CHANNEL_FORMAT_3_FRONT_2_SIDE_2_BACK_LFE = 7
-// alert (mediaPlayer.getAudioStreamInfo(cList[x]).channelMode);
- // AUDIO_CHANNEL_MODE_NORMAL = 0
- // AUDIO_CHANNEL_MODE_DUAL_MONO_LEFT_ONLY = 1
- // AUDIO_CHANNEL_MODE_DUAL_MONO_RIGHT_ONLY = 2
- // AUDIO_CHANNEL_MODE_DUAL_MONO_STEREO = 3
- // AUDIO_CHANNEL_MODE_DUAL_MONO_MIXED = 4
-
- if (lang_prio_dyn[xx] !== "NAR") {
- xx += 1;
- } else {
- lang_prio_dyn.length = xx;
- }
-
-
- }
- if(cList[x].type == 1) {
- Radioicon = "\uE00F";
- AvInfo[currStream] = AvInfo[currStream] + " Video " + mediaPlayer.getVideoStreamInfo(cList[x]).encoding + " size : " + mediaPlayer.getVideoStreamInfo(cList[x]).resolutionX + " x " + mediaPlayer.getVideoStreamInfo(cList[x]).resolutionY;
- if (mediaPlayer.getVideoStreamInfo(cList[x]).aspectRatio == "0") { AvInfo[currStream] = AvInfo[currStream] + " (?:?)"; }
- if (mediaPlayer.getVideoStreamInfo(cList[x]).aspectRatio == "1") { AvInfo[currStream] = AvInfo[currStream] + " (4:3)"; }
- if (mediaPlayer.getVideoStreamInfo(cList[x]).aspectRatio == "2") { AvInfo[currStream] = AvInfo[currStream] + " (16:9)"; }
- }
-
- if(cList[x].type == 2) {
- if (xs == 0) { subs = " SUBS : " } else { subs += " , ";}
- subs_prio_dyn[xs] = mediaPlayer.getSubtitleStreamInfo(cList[x]).language;
- subs = subs + subs_prio_dyn[xs];
- xs += 1;
- }
-
- if(cList[x].type == 3) {
- alert("COMPONENT_SUBTITLE_CAPTION");
- //This is an ARIB specific type of subtitles
- }
- if(cList[x].type == 4) {
- alert("COMPONENT_SUBTITLE_SUPERIMPOSE");
- //This is an ARIB specific type of subtitles and used mainly for displaying alert messages on screen.
- }
- if(cList[x].type == 5) {
-// alert("TeletextStreamInfo : " + mediaPlayer.getTeletextStreamInfo(cList[x]).language)
- AvInfo[currStream] += " TXT";
- }
-
-
- }
- AvInfo[currStream] += subs;
-}
-
-
-function VideoOutput() {
-
-videoConfig = vos.getVideoConfiguration();
-
- var session = null;
- try {
- var currentOutput = 0; //0 = normaly HDMI
- displayInfo=videoConfig.getDisplayInfo(videoConfig.getVideoOutputs()[currentOutput]);
- var desiredMode = VideoOutputModes[Set_Res];
-
- // create the session
- session = vos.createVideoConfigurationSession();
- session.setDefaultVideoMode(videoConfig.getVideoOutputs()[currentOutput], desiredMode);
- session.apply();
- session.releaseInstance();
-
- }
- catch (e) {
- if (session != null) {
- session.releaseInstance();
- }
- alert(e);
- }
-
-setOSDscale();
-SetupFonts();
-
-}
-
-function setOSDscale() {
- fsAudio = (16*Yfactor[Set_Res]) + "px";
- fsTime = (16*Yfactor[Set_Res]) + "px";
- fsName = (27*Yfactor[Set_Res]) + "px";
- fsMenu = (27*Yfactor[Set_Res]) + "px";
- fsChan = (43*Yfactor[Set_Res]) + "px";
- fsCA = (32*Yfactor[Set_Res]) + "px";
- fsMenuMain = (35*Yfactor[Set_Res]) + "px";
- fsEpg = (19*Yfactor[Set_Res]) + "px";
- fsEpginfo = (21*Yfactor[Set_Res]) + "px";
- fsList = (18*Yfactor[Set_Res]) + "px";
- fsSchedList = (18*Yfactor[Set_Res]) + "px";
- fsSched = (26*Yfactor[Set_Res]) + "px";
- fsRec = (35*Yfactor[Set_Res]) + "px";
- fsReclist = (19*Yfactor[Set_Res]) + "px";
- fsMedia = (27*Yfactor[Set_Res]) + "px";
- fsKeys = (19*Yfactor[Set_Res]) + "px";
-}
-
-function addzero(zero)
-{
-if (zero<10)
- {
- zero="0" + zero;
- }
-
-return zero;
-}
-
-function ExtraStuff(){
- if(TimeShift){
- initialDelayID = setTimeout("startTimeshiftBuffering();", 5000);
- }
- if(testing2) {
- if (CAdelayID != -1) { clearTimeout(CAdelayID); CAdelayID = -1; switchtimer.style.opacity = 0;}
- if ( (currChan > 10 && currChan < 26 ) || (currChan > 40 && currChan < 50 ) || (currChan > 50 && currChan < 120 ) ||
- (currChan > 151 && currChan < 200) || (currChan > 604 && currChan < 612 ) || (currChan > 624 && currChan < 631) ||
- (currChan > 632 && currChan < 700) || (currChan > 8004 && currChan < 8027) )
- {
- //Show info if set nonfree
- switchtimer.style.background = "red";
- switchtimer.innerHTML = "<pre><center>\n" + Lang[90] +"\n\n </center></pre>"; // Non free channel message
- switchtimer.style.opacity = 1;
- CAdelayID = setTimeout("switchtimer.style.opacity = 0;",ShowSetTimer);
- }
- }
-
-}
-
-function startTimeshiftBuffering() {
- // check that media player is working
- if (mediaPlayer.getState() != mediaPlayer.STATE_PLAYING ) {
- alert("Media Player must be playing when starting timeshift buffering!");
- return;
- }
-
- mediaPlayer.startTimeshiftBuffering(600);
-}
-
-
-function FullScreen() {
- videoplane.style.width = "100%";
- videoplane.style.height = "100%";
- videoplane.style.left = "0px";
- videoplane.style.top = "0px";
- if(PipSwitchGuide){
- if (pipPlayer.getState() != pipPlayer.STATE_IDLE) {
- pipPlayer.close();
- }
- }
-}
-
-
-function onKeyDown(event) {
-//show key info, needed when a 'new' remote is used
-//alert( "keyIdentifier : " + event.keyIdentifier +"\n"+"ctrlKey : " + event.ctrlKey +"\n"+"altKey : " + event.altKey +"\n"+"shiftKey : " + event.shiftKey +"\n"+"RAW : " + event );
-
- if(isVisible) {
- onKeyTeletext(event.keyIdentifier);
- } else if(isSetupMenu) {
- onKeyMenu(event.keyIdentifier);
- } else if(isMediaMenu) {
- onKeyMedia(event.keyIdentifier);
- } else {
-
- switch(event.keyIdentifier) {
-
- case "ChannelUp":
- case "Up":
- if(isFullscreen) {
- count = 0; Change = 0;
- prevChan = currChan;
- do
- {
- incChan(1);
- }
- while (!channels[currChan]);
- play(channels[currChan]);
- } else {
- // swap up <> down in guide mode
- count = 0; Change = 0;
- do
- {
- decChan(1);
- }
- while (!channels[currChan]);
- preview(channels[currChan]);
- }
- break;
- case "ChannelDown":
- case "Down":
- if(isFullscreen) {
- count = 0; Change = 0;
- prevChan = currChan;
- do
- {
- decChan(1);
- }
- while (!channels[currChan]);
- play(channels[currChan]);
- } else {
- // swap up <> down in guide mode
- count = 0; Change = 0;
- do
- {
- incChan(1);
- }
- while (!channels[currChan]);
- preview(channels[currChan]);
- }
- break;
- case "Left":
- count = 0; Change = 0;
- if(isFullscreen) {
- defChan[ChanGroup] = currChan;
- do
- {
- do
- ChanGroup -= 1;
- while (protChn[ChanGroup] == 1 && ShowProtectedChannels == 1)
- if (ChanGroup < 0) {
- ChanGroup = 9;
- }
- }
- while (!minChan[ChanGroup]);
- currChan = defChan[ChanGroup];
- play(channels[currChan]);
- } else {
- prevChan = currChan;
- if (currChan > (minChan[ChanGroup] + 8)) {
- decChan(9);
- } else {
- currChan = baseChn[ChanGroup] + (maxChan[ChanGroup] - currChan);
- }
- do
- {
- decChan(1);
- }
- while (!channels[currChan]);
- preview(channels[currChan]);
- }
- break;
- case "Right":
- count = 0; Change = 0;
- if(isFullscreen) {
- defChan[ChanGroup] = currChan;
- do
- {
- do
- ChanGroup += 1;
- while (protChn[ChanGroup] == 1 && ShowProtectedChannels == 1)
- if (ChanGroup > 9) {
- ChanGroup = 0;
- }
- }
- while (!minChan[ChanGroup]);
- currChan = defChan[ChanGroup];
- play(channels[currChan]);
-
- } else {
- prevChan = currChan;
- if (currChan < (maxChan[ChanGroup] - 9 )) {
- incChan(9);
- } else {
- currChan = baseChn[ChanGroup] + (maxChan[ChanGroup] - currChan);
- }
- do
- {
- incChan(1);
- }
- while (!channels[currChan]);
- preview(channels[currChan]);
- }
- break;
- case "Red":
- if(isFullscreen) {
- if(showClock == 0 ) {
- showDisplay("", true, 80, 1 );
- showClock = 1;
- } else if(showClock == 1 ) {
- showClock = 0;
- showDisplay(Right(currChan.toString(),4), false, 100, 0 );
- }
- } else if(isSchedule == 0){
- if(NowNext) {
- settimer(EPG[1][2][currChan],EPG[1][1][currChan],0,1,"",(EPG[1][4][currChan] + EPG[1][5][currChan]),EPG[1][6][currChan].toString());
- }
- }
- break;
- case "Green":
- if(isFullscreen) {
- if(!epgactive) {
- if (audio_dyn < (lang_prio_dyn.length -1)) { audio_dyn += 1} else { audio_dyn = 0 }
- if (lang_prio_dyn.length > 1) {
- is.setObject("cfg.media.audio.languagepriority",lang_prio_dyn[audio_dyn] + "," + lang_prio[audio],is.STORAGE_PERMANENT);
- osdlang.style.opacity = 1;
- osdlang.innerHTML = "<img src='unmute.png'> " + lang_prio_dyn[audio_dyn] + " ";
- setTimeout("osdlang.style.opacity = 0; ", 3000);
- }
- }
- } else if(isSchedule == 0 && !epgactive){
- colorkeys.innerHTML = "<font color=red> " + NN[3 + NowNext] + " </font><font color=green> " + NN[NowNext] + " </font><font color=yellow> " + NN[2] + " </font><font color=blue> " + NN[5] + " </font>";
- NowNext = 1 - NowNext;
- showChannelList();
- }
-
- if(epgactive) {
- NowNext = 1 - NowNext;
- osdepginfo.style.opacity = 1 - osdepginfo.style.opacity ;
- osdepginfonext.style.opacity = 1 - osdepginfo.style.opacity;
- }
-
-
- break;
- case "Yellow":
- if(isFullscreen) {
- if(epgactive) {
- osdepginfo.style.opacity = 0;
- osdepginfonext.style.opacity = 0;
- epgactive = 0;
- }
- medialist.style.opacity = 0.9;
- set_yellow_key = 1;
- setTimeout("getSchedule(currChan);LoadMediaSettings();",100);
- } else {
- GetSchedule(currChan,15);
- schedule.style.opacity = 1 - schedule.style.opacity;
- isSchedule = schedule.style.opacity;
- if(isSchedule == 1){
- colorkeys.innerHTML = "<font color=red> " + NN[4] + " </font><font color=green> " + NN[4] + " </font><font color=yellow> " + NN[6] + " </font><font color=blue> " + NN[4] + " </font>";
- } else {
- colorkeys.innerHTML = "<font color=red> " + NN[3 + (1 - NowNext)] + " </font><font color=green> " + NN[1 - NowNext] + " </font><font color=yellow> " + NN[2] + " </font><font color=blue> " + NN[5] + " </font>";
- }
- }
- break;
-
- case "Info":
- case "Blue":
- case KEY_EPG:
-// if(isFullscreen) {
-// RestartPortal();
-// } else
- if(isSchedule == 0) {
- if(!epgactive) {
- updateOSDtime(currChan);
- SetOsdInfo();
- if(isFullscreen) { NowNext = 0;}
- if (NowNext) {
- osdepginfo.style.opacity = 0;
- osdepginfonext.style.opacity = 1;
- } else {
- osdepginfo.style.opacity = 1;
- osdepginfonext.style.opacity = 0;
- }
- epgactive = 1;
- } else {
- osdepginfo.style.opacity = 0;
- osdepginfonext.style.opacity = 0;
- epgactive = 0;
- }
-// setTimeout("epgactive = 0; osdepginfo.style.opacity = 0; osdepginfonext.style.opacity = 0;", 5000);
- }
- break;
- case "BrowserBack":
- if(count) {
- count = 0;
- osdnr.style.opacity = 0;
- if(isFullscreen) {
- showDisplay(Right(currChan.toString(),4), false, 100, 0 );
- }
- Change = 0;
- } else {
- if(isSchedule) {
- isSchedule = 0;
- schedule.style.opacity = 0;
- colorkeys.innerHTML = "<font color=red> " + NN[3 + (1 - NowNext)] + " </font><font color=green> "
- + NN[1 - NowNext] + " </font><font color=yellow> " + NN[2] + " </font><font color=blue> "
- + NN[5] + " </font>";
- break;
- }
-
- if(isFullscreen) {
- //SHOW epg info
- if(!epgactive) {
-// SetOsdInfo();
-// osdepginfo.style.opacity = 1;
-// osdepginfonext.style.opacity = 0;
-// epgactive = 1;
- } else {
- osdepginfo.style.opacity = 0;
- osdepginfonext.style.opacity = 0;
- epgactive = 0;
- }
-// setTimeout("epgactive = 0; osdepginfo.style.opacity = 0; osdepginfonext.style.opacity = 0;", 5000);
- } else if(!isFullscreen){
- osdepginfo.style.opacity = 0;
- osdepginfonext.style.opacity = 0;
- epgactive = 0;
- isFullscreen = 1;
- FullScreen();
- currChan = preChan;
- ChanGroup = preGrp;
- }
- }
- break;
-
- case "Enter":
- // OK key on frontpanel
- case KEY_OK:
- if(isFullscreen) {
- // fullscreen
- if (osdmain.style.opacity !== 0) {opacity = 0; OSD(opacity);}
- if(count == 0) {
- if (osdtimeout) {
- clearTimeout(osdtimeout);
- osdtimeout = 0;
- opacity = 0;
- OSD(opacity);
- break;
- }
- osdepg.innerHTML = "";
- showOSD();
- GetEPG(currChan);
- updateOSDtime(currChan);
- osdepg.innerHTML = "<p>" + EPG[0][7][currChan] + "</p>\n<p>" + EPG[1][7][currChan] + "</p>";
-// showOSD();
- } else {
- CheckChannel(Change);
- count = 0;
- if(ChangeOK) {
- play(channels[currChan]);
- ChangeOK = 0;
- }
- }
- } else {
- // if not fullscreen
- if(count){
- CheckChannel(Change);
- count = 0;
- if(ChangeOK) {
- preview(channels[currChan]);
- ChangeOK = 0;
- }
- } else {
- isFullscreen = 1;
- FullScreen();
- if(isSchedule) { isSchedule = 0; schedule.style.opacity = 0; }
- play(channels[currChan]);
- }
- }
- break;
-
- case "Menu":
- if(isFullscreen) {
- if(count) {
- count = 0;
- osdnr.style.opacity = 0;
- showDisplay(Right(currChan.toString(),4), false, 100, 0 );
- Change = 0;
- }
- osdepginfo.style.opacity = 0;
- osdepginfonext.style.opacity = 0;
- isSetupMenu = 1;
- mainmenu.style.opacity = 0.8;
- menu = 0;
- InitMenu(menu);
- }
- break;
- case KEY_FAV:
- case "Scroll":
- if(isFullscreen) {
- NowNext = 0;
- videoplane.style.width = (320*Xfactor[Set_Res])+"px";
- videoplane.style.height = (240*Yfactor[Set_Res])+"px";
- videoplane.style.left = (380*Xfactor[Set_Res])+"px";
- videoplane.style.top = (300*Yfactor[Set_Res])+"px";
- isFullscreen = 0;
- ClearScreen();
- channellist.style.opacity = 1;
- colorkeys.innerHTML = "<font color=red> " + NN[3 + (1 - NowNext)] + " </font><font color=green> " + NN[1 - NowNext] + " </font><font color=yellow> " + NN[2] + " </font><font color=blue> " + NN[5] + " </font>";
- colorkeys.style.opacity = 1;
- showChannelList();
- if(!SwitchGuide) {
- preChan = currChan;
- preGrp = ChanGroup;
- }
- } else {
- isSchedule = 0;
- schedule.style.opacity = 0;
- isFullscreen = 1;
- FullScreen();
- if(!SwitchGuide) {
- currChan = preChan;
- ChanGroup = preGrp;
- }
- }
- break;
- case "TV":
- case "RADIO":
- if(isFullscreen) {
- if(ChanGroup !== 9) {
- //Radio
- defChan[ChanGroup] = currChan;
- ChanGroup = 9;
- currChan = defChan[9];
- } else {
- //TV
- defChan[ChanGroup] = currChan;
- ChanGroup = 0;
- currChan = defChan[0];
- }
- isSetupMenu = 0;
- mainmenu.style.opacity = 0;
- play(channels[currChan]);
- }
- break;
- case KEY_0:
- digit = 0;
- Makedigit();
- break;
- case KEY_1:
- digit = 1;
- Makedigit();
- break;
- case KEY_2:
- digit = 2;
- Makedigit();
- break;
- case KEY_3:
- digit = 3;
- Makedigit();
- break;
- case KEY_4:
- digit = 4;
- Makedigit();
- break;
- case KEY_5:
- digit = 5;
- Makedigit();
- break;
- case KEY_6:
- digit = 6;
- Makedigit();
- break;
- case KEY_7:
- digit = 7;
- Makedigit();
- break;
- case KEY_8:
- digit = 8;
- Makedigit();
- break;
- case KEY_9:
- digit = 9;
- Makedigit();
- break;
-
- case KEY_A:// |> key on old long kpn 1710/1760 remote
- 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]);
- }
- break;
- case KEY_C:// @ key on old long kpn 1710/1760 remote
- if(isFullscreen && Fav_max_channel !== 0 && ChanGroup !== Fav_group) {
- timerID = (defChan[Fav_group] - Fav_base - 1); if (timerID < 0) { timerID = 0;}
- maxTimers = Fav_max_channel;
- GotoFav(defChan[Fav_group]);
- } else if(isFullscreen && ChanGroup == Fav_group) {
- timerID = (currChan - Fav_base - 1);
- }
- if(isFullscreen && Fav_max_channel !== 0) {
- if(count) {
- count = 0;
- osdnr.style.opacity = 0;
- showDisplay(Right(currChan.toString(),4), false, 100, 0 );
- Change = 0;
- }
- osdepginfo.style.opacity = 0;
- osdepginfonext.style.opacity = 0;
- isSetupMenu = 1;
- mainmenu.style.opacity = 0.8;
- menu = 10;
- InitMenu(menu);
- }
-
-
- break;
- case KEY_D:// >@ key on old long kpn 1710/1760 remote
- if (protChn[ChanGroup] !== 1 && ChanGroup !== Fav_group) {
- AddtoFav();
- }
- break;
-
- case "Teletext":
- if(isFullscreen) {
- ClearScreen();
- isVisible = 1;
- setVisible(isVisible);
- }
- break;
- case "VolumeMute":
- VolumeMute();
- break;
- case "VolumeUp":
- VolumeUp();
- break;
- case "VolumeDown":
- VolumeDown();
- break;
-
- case "MediaRewind":
- if(isFullscreen) {
- mediaPlayer.play(mediaPlayer.PACE_REWIND);
- } else {
- count = 0; Change = 0;
- defChan[ChanGroup] = currChan;
- do {
- do
- ChanGroup -= 1;
- while (protChn[ChanGroup] == 1 && ShowProtectedChannels == 1)
- if (ChanGroup < 0) {
- ChanGroup = 9;
- }
- }
- while (!minChan[ChanGroup]);
- currChan = defChan[ChanGroup];
- preview(channels[currChan]);
- }
- break;
- case "MediaForward":
- if(isFullscreen) {
- mediaPlayer.play(mediaPlayer.PACE_FASTFORWARD);
- } else {
- count = 0; Change = 0;
- defChan[ChanGroup] = currChan;
- do{
- do
- ChanGroup += 1;
- while (protChn[ChanGroup] == 1 && ShowProtectedChannels == 1)
- if (ChanGroup > 9) {
- ChanGroup = 0;
- }
- }
- while (!minChan[ChanGroup]);
- currChan = defChan[ChanGroup];
- preview(channels[currChan]);
- }
- break;
- case "MediaPlayPause":
-
- if(isFullscreen && PauseOnServer) {
- if(mediaPlayer.getState() == mediaPlayer.STATE_PLAYING) {
- isPause = 1;
- ServerPause();
- SetLed(1,1,10);
-// setTimeout("mediaPlayer.play(0);",5000);
- mediaPlayer.play(0);
- break;
- }
- if(mediaPlayer.getState() == mediaPlayer.STATE_PAUSED || mediaPlayer.getState() == mediaPlayer.STATE_FASTFORWARDING ||
- mediaPlayer.getState() == mediaPlayer.STATE_REWINDING) {
- SetLed(1,1,0);
- mediaPlayer.play(mediaPlayer.PACE_PLAY);
- break;
- }
-
- }
-
- if(TimeShift){
- if(mediaPlayer.getState() == mediaPlayer.STATE_PAUSED || mediaPlayer.getState() == mediaPlayer.STATE_FASTFORWARDING || mediaPlayer.getState() == mediaPlayer.STATE_REWINDING) {
- SetLed(1,1,0);
- mediaPlayer.play(mediaPlayer.PACE_PLAY);
- break;
- }
- if(mediaPlayer.getState() == mediaPlayer.STATE_PLAYING) {
- SetLed(1,1,10);
- mediaPlayer.play(0);
- break;
- }
- }
- break;
- case "MediaStop":
- try {
- SetLed(1,1,0);
- if(TimeShift){ mediaPlayer.playFromPosition(mediaPlayer.POSITION_LIVE,mediaPlayer.PACE_PLAY); }
- } catch(e) {
- alert(e);
- }
- break;
- case KEY_REC:
- case KEY_REC2:
- if(isSchedule == 0) {
- if(epgactive) {
- ServerTimer(channels[currChan],EPG[NowNext][6][currChan]);
- settimer(EPG[NowNext][2][currChan],EPG[NowNext][1][currChan],(EPG[NowNext][3][currChan]*60),2);
- } else {
- ServerRecordStart();
- }
- }
-// if(isFullscreen && !epgactive) {
-// ServerRecordStart();
-// } else if(isSchedule == 0){
-// if(NowNext) {
-// } else {
-// // make timer for recording
-// ServerTimer(channels[currChan],EPG[NowNext][6][currChan]);
-// settimer(EPG[NowNext][2][currChan],EPG[NowNext][1][currChan],(EPG[NowNext][3][currChan]*60),2);
-// } else {
-// ServerRecordStart();
-// }
-// }
-
-
- break;
- case KEY_OPNAMES:
- case KEY_FILM:
- case KEY_DVR:
- if (smartTVplugin) {
- // jump to recordings menu.
- if(isFullscreen) {
- if(count) {
- count = 0;
- osdnr.style.opacity = 0;
- showDisplay(Right(currChan.toString(),4), false, 100, 0 );
- Change = 0;
- }
- osdepginfo.style.opacity = 0;
- osdepginfonext.style.opacity = 0;
- medialist.style.opacity = 0.9;
- mainmenu.style.opacity = 0;
- recPath = "/recordings.xml";
- setTimeout("getRecList();LoadMediaSettings();",100);
- }
- break;
- }
- default:
- break;
- }
- }
-}
-
-
-function GotoFav(ChanID) {
- count = 0; Change = 0;
- prevChan = ""; Fav_key1 = "";
- defChan[ChanGroup] = currChan;
- ChanGroup = Fav_group;
- currChan = ChanID;
- play(channels[currChan]);
-}
-
-
-function AddtoFav() {
- Fav_max_channel += 1;
- maxChan[Fav_group] = Fav_base + Fav_max_channel;
- channelsnames[(Fav_base + Fav_max_channel)] = channelsnames[currChan];
- channels[(Fav_base + Fav_max_channel)] = channels[currChan];
- is.setObject(("vip.channelsnames." + Fav_max_channel),channelsnames[currChan],is.STORAGE_PERMANENT)
- is.setObject(("vip.channels." + Fav_max_channel),channels[currChan],is.STORAGE_PERMANENT)
- is.setObject("vip.fav_max_channel",Fav_max_channel.toString(),is.STORAGE_PERMANENT)
- settimer(0,channels[currChan],Fav_max_channel ,2);
-}
-
-
-function Read_Fav() {
- Fav_max_channel = Number(is.getObject("vip.fav_max_channel"));
- maxChan[Fav_group] = Fav_base + Fav_max_channel;
- for (var i=1; i<=Fav_max_channel; i++) {
- channelsnames[(i+Fav_base)] = is.getObject(("vip.channelsnames." + i));
- channels[(i+Fav_base)] = is.getObject(("vip.channels." + i));
- }
-}
-
-
-function Makedigit() {
- prevChan = currChan;
- Change = (Change*10) + digit;
- count += 1;
- osdnr.style.opacity = isFullscreen;
- OSDchannr(Change);
- if(isFullscreen) {
- showDisplay((Change.toString()), false, 100, 0 );
- }
-
- if (count>channeldigits) {
- CheckChannel(Change);
- count = 0;
- }
- if(ChangeOK) {
- if(isFullscreen) {
- play(channels[currChan]);
- } else {
- preview(channels[currChan]);
- }
- ChangeOK = 0;
- }
-}
-
-function CheckChannel(CheckThis) {
-// function to check if channel exists
- CheckThis = baseChn[ChanGroup] + CheckThis;
- if(channels[CheckThis]) {
- ChangeOK = 1;
- currChan = CheckThis;
- } else {
- ChangeOK = 0;
- }
- if(prevChan == currChan) {
- ChangeOK = 0 ;
- }
- osdnr.style.opacity = 0;
- if(isFullscreen) {
- showDisplay(Right(currChan.toString(),4), false, 100, 0 );
- }
- Change = 0;
-
-}
-
-
-function showDisplay(showtxt,colonState,intensity,currentMode) {
- if(!showClock){
- fps.setSegmentDisplayState(toi.statics.ToiFrontPanelServiceSegmentDisplayState.create(showtxt,colonState,intensity,currentMode));
- }
-}
-
-function SetLed(NumLed,color,blinkfreq){
- var state = toi.statics.ToiFrontPanelServiceLedState.create(color, blinkfreq);
- fps.setLedState(NumLed, state);
-}
-
-
-function showOSD() {
- if (osdtimeout) {
- clearTimeout(osdtimeout);
- }
- SetOsdInfo();
- opacity = 1;
- OSD(opacity);
- osdtimeout = setTimeout("fadeOut(); osdtimeout = 0;", ShowOsdTime);
-}
-
-function showVolume() {
- if (osdVolumetimeout) {
- clearTimeout(osdVolumetimeout);
- }
- osdvolume.innerHTML = Lang[1] + " : " + Volume + "% \uE007" + (new Array(Volume)).join("\uE008") + (new Array(100 - Volume)).join("\uE009") + "\uE00A";
- osdvolume.style.opacity = 1;
- osdVolumetimeout = setTimeout("osdvolume.style.opacity = 0;", ShowOsdTime);
-}
-
-
-function OSD(opacity) {
- osdmain.style.opacity = opacity;
- osdnr.style.opacity = opacity;
- osdtime.style.opacity = opacity;
- osdname.style.opacity = opacity;
- osdepg.style.opacity = opacity;
- osdca.style.opacity = opacity;
- osdtimer.style.opacity = opacity;
-}
-
-
-function SetOsdInfo() {
- OSDchannr(currChan);
- date_time();
- OSDhtml();
- return;
-}
-
-function onCacheUpdated() {
- GetEPG(currChan);
- if (osdtimeout) { SetOsdInfo(); }
-}
-
-function OSDchannr(channr) {
-// Show logo's
- if (experimental) {
-// osdnr.innerHTML = "<img src='" + channels[currChan] + ".logo.jpg' style='width:80%; max-height:100%; position:absolute; left:10%;' >";
- }
- osdnr.innerHTML = "<center>" + Right(channr,3) + "</center>";
-}
-
-function OSDhtml(){
- osdtime.innerHTML = result;
- if (ShowSource == 1) {
- osdname.innerHTML = channels[currChan].split("-")[0] + "\uE003" + Left(channelsnames[currChan],30);
- } else {
- osdname.innerHTML = Left(channelsnames[currChan],30);
- }
- osdepg.innerHTML = "<p>" + EPG[0][7][currChan] + "</p>\n<p>" + EPG[1][7][currChan] + "</p>";
- osdepginfo.innerHTML = "<center><p style='" + color_epg_head + ";' >" + currChan + "\uE003" + channelsnames[currChan] + "</p><p style='" + color_epg_avinfo + ";' >" + AvInfo[currChan] + "</p><p style='" + color_epg_title + ";'>" + EPG[0][7][currChan] + EPG[0][9][currChan] + EPG[0][8][currChan] + "</p>\n<p style='" + color_epg_info + ";'>" + EPG[0][4][currChan] + "</p>\n<p>" + Left(EPG[0][5][currChan],750) + "</p></center>";
- osdepginfonext.innerHTML = "<center><p style='" + color_epg_head + ";'>" + currChan + "\uE003" + channelsnames[currChan] + "</p><p style='" + color_epg_title + ";'>" + EPG[1][7][currChan] + EPG[1][9][currChan] + EPG[1][8][currChan] + "</p>\n<p style='" + color_epg_info + ";'>" + EPG[1][4][currChan] + "</p>\n<p>" + Left(EPG[1][5][currChan],750) + "</p></center>";
-}
-
-function updateOSDtime(timchan) {
-
- tijd = EPG[0][2][timchan];
- date = new Date(tijd*1000);
- tijd = date.toUTCString();
- tijd = new Date(tijd);
- dateCurrent = new Date();
- var EPGminutes = Math.floor((dateCurrent.getTime() - date.getTime()) /1000/60);
- 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] + " ";
- if (!EPG[0][2][timchan] || ((EPG[0][3][timchan]-EPGminutes) < 0))
- {
- EPG[0][7][timchan] = " ";
- }
-
-}
-
-
-function settimer(ProgTime,ProgName,ProgDura,SwitchTimer,BackGroundColor,ProgDesc,ProgEvID) {
-
-if (!BackGroundColor) { BackGroundColor = DefaultBGColor;}
-// 1 - switchonly, 2 - record on server (display info only), 3 - record local
- if(SwitchTimer == 1) {
- try {
- var x = ss.schedule("SwitchOnly","notification", ProgTime , ProgDura);
- ss.setParameter(x, "Channel", currChan.toString() );
- ss.setParameter(x, "Title", ProgName );
- ss.setParameter(x, "Info", ProgDesc);
- ss.setParameter(x, "active", "False");
- ss.setParameter(x, "Type", "\uE00C"); //Timer Symbol
- ss.setParameter(x, "resume", "0");
- ss.setParameter(x, "Eventid", ProgEvID);
-
- }
- catch (e) {
- ProgName = "ERROR" ;
- BackGroundColor = "red";
- }
- } else if(SwitchTimer == 3) {
- ProgTime -= preRecTime;
- ProgDura = Number(ProgDura) + (afterRecTime + preRecTime);
- var y = (new Date().getTime()/1000).toFixed(0);
- if(ProgTime < y) {
- ProgDura = ProgDura - (y - ProgTime);
- ProgTime = y;
- }
-
- try {
- var x = ss.schedule("RecLocal","record_hd_from_ip", ProgTime , ProgDura);
- if (x != 0) {
- ss.setParameter(x, "Channel", currChan.toString() );
- ss.setParameter(x, "Title", ProgName );
- ss.setParameter(x, "Info", ProgDesc);
- ss.setParameter(x, "active", "False");
- ss.setParameter(x, "Type", "\uE00C"); //Timer Symbol
- ss.setParameter(x, "resume", "0");
- ss.setParameter(x, "Eventid", ProgEvID);
- } else {
- ProgName = "ERROR" ;
- BackGroundColor = "red";
- }
- } catch (e) {
- alert(e);
- }
- }
-
- if ( ProgTime == 0 && SwitchTimer == 2 && ProgDura !== 0 ) {
- var x = Lang[3] + ProgDura + "</pre>";
- } else if ( ProgTime == 0 && SwitchTimer == 2) {
- var x = "</pre>";
- } else {
- tijd = ProgTime;
- date = new Date(tijd*1000);
- tijd = date.toUTCString();
- tijd = new Date(tijd);
- var tm = tijd.getMinutes();
- var th = tijd.getHours();
- th=addzero(th);
- tm=addzero(tm);
- var x = Lang[4] + th + ":" + tm + "</pre>";
- }
-
- switchtimer.style.background = BackGroundColor;
- switchtimer.innerHTML = "<pre>" + Lang[2] + Left(ProgName,30) + "\n" + Lang[3] + channelsnames[currChan] + "\n" + x;
- setOSDtimer();
-
- switchtimer.style.opacity = 1;
- setTimeout("switchtimer.style.opacity = 0;", ShowSetTimer);
-
-}
-
-
-function setOSDtimer() {
- // Only for type "SwitchOnly"
- var today = new Date;
- today = today / 1000;
- var x = ss.getBookingIds("SwitchOnly", today, 0)
- if (x.length !== 0) {
- tijd = ss.getNextStartTime("SwitchOnly");
- date = new Date(tijd*1000);
- tijd = date.toUTCString();
- tijd = new Date(tijd);
- var tm = tijd.getMinutes();
- var th = tijd.getHours();
- th=addzero(th);
- tm=addzero(tm);
- osdtimer.innerHTML = "<p style='" + color_osdtimer + ";font-size:" + fsList + ";'>" + th + ":" + tm + "</p>";
- SetLed(0,2,1);
- switchicon = "\uE00C";
- osdca.innerHTML = CAicon + switchicon + RECicon;
- } else {
- osdtimer.innerHTML = " ";
- SetLed(0,0,0);
- switchicon = '\uE003';
- osdca.innerHTML = CAicon + switchicon + RECicon;
- }
-}
-
-// Left n characters of str
-function Left(str, n){
- if (n <= 0)
- return "";
- else if (n > String(str).length)
- return str;
- else
- return String(str).substring(0,n);
-}
-
-// Right n characters of str
-function Right(str, n){
- if (n <= 0)
- return "";
- else if (n > String(str).length)
- return str;
- else {
- var iLen = String(str).length;
- return String(str).substring(iLen, iLen - n);
- }
-}
-
-function fadeIn() {
- opacity += 0.2;
- OSD(opcity);
- if (opacity >= 1) {
- setTimeout("fadeOut()", 200);
- return;
- }
- setTimeout("fadeIn()", 100);
-}
-
-function fadeOut() {
- opacity -= 0.5;
- OSD(opacity);
- if (opacity <= 0) {
- return;
- }
- setTimeout("fadeOut()", 100);
-}
-
-function RestartPortal(){
-
- try {
- ids = toi.applicationService.getApplicationIds();
- for ( i = 0; i < ids.length; ++i ){
- info = toi.applicationService.getInfo(ids[i]);
- if (info.applicationName == "WebKit Portal"){
- dump("Killing app " + ids[i] + ": " + info.applicationName);
- toi.applicationService.kill(ids[i]);
- }
- }
- }
- catch(e) { dump(e) };
-}
-
-function date_time()
-{
- date = new Date;
- year = date.getFullYear();
- month = date.getMonth();
- d = date.getDate();
- day = date.getDay();
- h = date.getHours();
- m = date.getMinutes();
- h=addzero(h);
- m=addzero(m);
- result = ''+days[day]+' '+d+' '+months[month]+' '+year+' '+h+':'+m;
- return;
-}
-
-function date_time_rec()
-{
- date = new Date(Number(recStrt[currMed])*1000);
- year = date.getFullYear();
- month = date.getMonth();
- month = addzero(month + 1);
- d = date.getDate();
- d = addzero(d);
- day = date.getDay();
- h = date.getHours();
- m = date.getMinutes();
- h = addzero(h);
- m = addzero(m);
- if (year!==1970) {
- result = ' ' + d + '-' + month + '-' + year + ' ' + h + ':' + m;
- } else {
- result = "";
- }
- return;
-}
-
-// EPG Section
-
-function GetEPG(epgchan)
-{
- EPG[0][7][epgchan] = "";
- EPGShortnow = "";
- EPGExtnow = "";
- EPG[1][7][epgchan] = "";
- EPGShortnext = "";
- EPGExtnext = "";
- SI="";
- try {
-
- eitCache.clearServices();
-
- StreamInfo(epgchan);
-
- eitService = toi.statics.ToiDvbEitCacheServiceItem.create(SI[1],SI[2],SI[3]);
- eitCache.addService(eitService);
- event = eitCache.getPresentEvent(eitService);
- if(event.freeCaMode){
- CAicon = "\uE00D";
- } else {
- CAicon = Radioicon;
- }
-
- osdca.innerHTML = CAicon + switchicon + RECicon;
-
- if (event.name) {
- events = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000);
- extEventsnow = eitCache.getExtendedEventInfo(eitService, events.infoSequence[0].eventId);
- EPGShortnow = extEventsnow.shortInfo;
- EPGExtnow = extEventsnow.extendedInfo;
- Extok = 1;
-
- } else { Extok = 0; }
-
-
-
- EPG[0][1][epgchan] = event.name;
- EPG[0][2][epgchan] = event.time;
- EPG[0][3][epgchan] = (event.duration/60);
-// EPG[0][4][epgchan] = "";
-// EPG[0][5][epgchan] = "";
- EPG[0][6][epgchan] = event.eventId;
- if (event.parentalRating) {
- EPG[0][8][epgchan] = "<br>(" + Lang[5] + (event.parentalRating + 3) + " )";
- } else {
- EPG[0][8][epgchan] = "";
- }
-
- if (event.contentNibbles) {
- connib = event.contentNibbles;
- Nibbles();
- EPG[0][9][epgchan] = "<br>" + content;
- } else {
- EPG[0][9][epgchan] = "";
- }
-
-
- if(EPGShortnow) {
- EPG[0][4][epgchan] = EPGShortnow;
- } else {
- EPG[0][4][epgchan] = "";
- }
- if(EPGExtnow) {
- EPG[0][5][epgchan] = EPGExtnow;
- } else {
- EPG[0][5][epgchan] = "";
- }
-
- if (EPG[0][5][epgchan] == EPG[0][4][epgchan]) { EPG[0][5][epgchan] = "";}
-
-
-
- updateOSDtime(epgchan);
-
- event = eitCache.getFollowingEvent(eitService);
- if (Extok) {
- for (var i = 0; i < events.infoSequence.length && i < 4; i++) {
- extEvents = eitCache.getExtendedEventInfo(eitService, events.infoSequence[i].eventId);
- if (extEvents.eventId == event.eventId) {
- EPGShortnext = extEvents.shortInfo;
- EPGExtnext = extEvents.extendedInfo;
- }
- }
- }
-
- EPG[1][1][epgchan] = event.name;
- EPG[1][2][epgchan] = event.time;
- EPG[1][3][epgchan] = (event.duration/60);
-// EPG[1][4][epgchan] = "";
-// EPG[1][5][epgchan] = "";
- EPG[1][6][epgchan] = event.eventId;
- if (event.parentalRating) {
- EPG[1][8][epgchan] = "<br>(" + Lang[5] + (event.parentalRating + 3) + " )";
- } else {
- EPG[1][8][epgchan] = "";
- }
-
- if (event.contentNibbles) {
- connib = event.contentNibbles;
- Nibbles();
- EPG[1][9][epgchan] = "<br>" + content;
- } else {
- EPG[1][9][epgchan] = "";
- }
-
- if(EPGShortnext) {
- EPG[1][4][epgchan] = EPGShortnext;
- } else {
- EPG[1][4][epgchan] = "";
- }
- if(EPGExtnext) {
- EPG[1][5][epgchan] = EPGExtnext;
- } else {
- EPG[1][5][epgchan] = "";
- }
-
- if (EPG[1][5][epgchan] == EPG[1][4][epgchan]) { EPG[1][5][epgchan] = "";}
-
- tijd = event.time;
- date = new Date(tijd*1000);
- tijd = date.toUTCString();
- tijd = new Date(tijd);
- var tm = tijd.getMinutes();
- var th = tijd.getHours();
- th=addzero(th);
- tm=addzero(tm);
- EPG[1][7][epgchan] = th + ":" + tm + " (" + (event.duration/60).toFixed(0) + ")" + " " + event.name + " ";
-
- if (!event.time)
- {
- EPG[1][7][epgchan] = " ";
- }
-
-
- } catch(e) {
- alert("Get EPG problem: " + e);
- CAicon = "\uE01A";
- }
-}
-
-
-function Nibbles() {
- content = "";
- if (connib >= 0x00001000 && connib < 0x00002000) { content = CLang[0]; }
- if (connib >= 0x00002000 && connib < 0x00003000) { content = CLang[10]; }
- if (connib >= 0x00003000 && connib < 0x00004000) { content = CLang[20]; }
- if (connib >= 0x00004000 && connib < 0x00005000) { content = CLang[30]; }
- if (connib >= 0x00005000 && connib < 0x00006000) { content = CLang[40]; }
- if (connib >= 0x00006000 && connib < 0x00007000) { content = CLang[50]; }
- if (connib >= 0x00007000 && connib < 0x00008000) { content = CLang[60]; }
- if (connib >= 0x00008000 && connib < 0x00009000) { content = CLang[70]; }
- if (connib >= 0x00009000 && connib < 0x0000A000) { content = CLang[80]; }
- if (connib >= 0x0000A000 && connib < 0x0000B000) { content = CLang[90]; }
- if (connib >= 0x0000B000 && connib < 0x0000C000) { content = CLang[100]; }
- // alert(connib);
-}
-
-
-function GetSchedule(schchan,tablelength){
- //Old style Schedule, used in Guide View.
- SI = "";
- try {
- StreamInfo(schchan);
-
- eitService = toi.statics.ToiDvbEitCacheServiceItem.create(SI[1],SI[2],SI[3]);
- eitCache.addService(eitService);
- event = eitCache.getPresentEvent(eitService);
- events = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000);
-
- if (event.name) {
- if (events.more) {
- var t = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000);
- events.infoSequence.concat(t.infoSequence);
- events.more = t.more;
- }
-
- var txt = "<table><tr>";
- var i = 0;
- for (i = 0; i < events.infoSequence.length && i < tablelength; i++) {
-
- while ((i > 0) && (events.infoSequence[i].eventId == events.infoSequence[(i-1)].eventId)) {
- i = i + 1;
- }
-
- tijd = events.infoSequence[i].time;
- date = new Date(tijd*1000);
- tijd = date.toUTCString();
- tijd = new Date(tijd);
- var tm = tijd.getMinutes();
- var th = tijd.getHours();
- th=addzero(th);
- tm=addzero(tm);
-
- txt = txt + "<td style='font-size:" + fsSchedList + ";" + color_sched_font + ";'>\uE003\uE003\uE003\uE003\uE003" + th + ":" + tm + " (" + (events.infoSequence[i].duration/60).toFixed(0) + ") " + Left(events.infoSequence[i].name,30) + "</td></tr>";
- }
- txt = txt + "</table>";
- schedule.innerHTML = "<p style='" + color_sched_head + ";font-size:" + fsSched + ";'>" + "\uE003" + schchan + "\uE003" + channelsnames[schchan] + txt + "</p>";
- } else {
- schedule.innerHTML = "<p style='" + color_sched_head + ";font-size:" + fsSched + ";'>" + "\uE003" + schchan + "\uE003" + channelsnames[schchan] + "</p>";
- }
-
- } catch(e) {
- alert("Get EPG problem: " + e);
- schedule.innerHTML = "<p style='" + color_sched_head + ";font-size:" + fsSched + ";'>" + "\uE003" + schchan + "\uE003" + channelsnames[schchan] + "</p><p>" + Lang[6] + "</p>";
- }
-
-}
-
-
-function StreamInfo(si) {
- // EPG Filter
- // streaminfo
- // SI[x] 0-sat,1-NID,2-TID,3-SID
- SI=channels[si].split("-");
-
- //default setting : English
- is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
-
- if(SI[0]=="C") {
- // Default on Cable - Dutch // Ziggo.
- is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="T") {
- // DVB-T default German.
- is.setObject("cfg.locale.ui","ger",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="8720") {
- // KPN DVB-T (might also be used for some german)
- is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S19.2E") {
- // Default on 19E German.
- is.setObject("cfg.locale.ui","ger",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S28.2E") {
- // Default on 28E English
- is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S42.0E") {
- is.setObject("cfg.locale.ui","tur",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S42.0E" && SI[3]=="3601") {
- is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="133") {
- //sky deutchland
- is.setObject("cfg.locale.ui","DEU",is.STORAGE_VOLATILE);
- }
-
- if(SI[2]=="1107") {
- //Sat1/pro7 deutchland
- is.setObject("cfg.locale.ui","DEU",is.STORAGE_VOLATILE);
- }
-
-// if(SI[2]=="1057") {
-// //RTL HD transponder
-// is.setObject("cfg.locale.ui","GER",is.STORAGE_VOLATILE);
-// }
-
-// if(SI[2]=="1057" && SI[3]=="61204") {
-// //Sport1 HD (daytime only?)
-// is.setObject("cfg.locale.ui","DEU",is.STORAGE_VOLATILE);
-// }
-
- if(SI[2]=="1055" || SI[2]=="1053" || SI[2]=="1041" || SI[2]=="1017" || SI[2]=="1109") {
- //HD+ transponder
- is.setObject("cfg.locale.ui","DEU",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S13.0E" && (SI[2]=="1600" || SI[2]=="1000" || SI[2]=="1500" || SI[2]=="1300" || SI[2]=="300" || SI[2]=="1100" )) {
- //NC+ (Polish)
- is.setObject("cfg.locale.ui","pol",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S13.0E" && (SI[2]=="11200" || SI[2]=="400" || SI[2]=="12000" || SI[2]=="11400" || SI[2]=="11900" || SI[2]=="11600" )) {
- //NC+ (Polish)
- is.setObject("cfg.locale.ui","pol",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S13.0E" && (SI[2]=="11000" || SI[2]=="1400")) {
- //NC+ (Polish)
- is.setObject("cfg.locale.ui","pol",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="113") {
- //PolSat
- is.setObject("cfg.locale.ui","pol",is.STORAGE_VOLATILE);
- }
-
- if((SI[0]=="S19.2E" && SI[2]=="1059") ) {
- //TVP transponder
- is.setObject("cfg.locale.ui","pol",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="64511") {
- //sky Italia
- is.setObject("cfg.locale.ui","ita",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S13.0E" && (SI[2]=="5400" || SI[2]=="12400" || SI[2]=="65419" || SI[2]=="65417" )) {
- //Rai Italia
- is.setObject("cfg.locale.ui","ita",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="53" ) {
- //Canal Digitaal/ TV Vlaanderen
- is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S19.2E" && SI[2]=="1048" && SI[3]=="4320" ) {
- //BVN
- is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
- }
-
-
- if(SI[1]=="54") {
- //ZON / 30W
- is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="83") {
- //MEO / 30W
- is.setObject("cfg.locale.ui","por",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="49") {
- //Digital 30W
- is.setObject("cfg.locale.ui","spa",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="3" && ( SI[2]=="3202" || SI[2]=="3208" || SI[2]=="3211" || SI[2]=="3222" || SI[2]=="3225") ) {
- //Canal Digitaal/ TV Vlaanderen (NID:3 is used for more than only CDS/TVV on 23East)
- is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="3" && SI[2]=="3208" && SI[3]=="7037") {
- // Some other EPG
- is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="3" && ( SI[2]=="3217") ) {
- // 23E - Deluxe HD
- is.setObject("cfg.locale.ui","DEU",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="3" && SI[2]=="3212" && ( SI[3]=="14052" || SI[3]=="14055" ) ) {
- is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="3" && ( SI[2]=="3205" || SI[2]=="3209" || SI[2]=="3210" || SI[2]=="3221" || SI[2]=="3219" || SI[2]=="3226")) {
- //Canal Digitaal/ TV Vlaanderen use CZE channels on 23East
- // Strangly set filter to cze but epg is in Dutch. (But not for JimJam)
- is.setObject("cfg.locale.ui","cze",is.STORAGE_VOLATILE);
- }
-
- if(SI[1]=="3" && SI[2]=="3211" && ( SI[3]=="20863" || SI[3]=="20865") ) {
- //MGM & Film+ CZ
- is.setObject("cfg.locale.ui","cze",is.STORAGE_VOLATILE);
- }
-
- if((SI[0]=="S13.0E" && SI[3]=="14003") || (SI[0]=="S13.0E" && SI[3]=="14009") || (SI[0]=="S13.0E" && SI[3]=="14051") || (SI[0]=="S13.0E" && SI[3]=="951")) {
- //Swiss ITA channels
- is.setObject("cfg.locale.ui","ita",is.STORAGE_VOLATILE);
- }
-
- if((SI[0]=="S13.0E" && SI[2]=="12800")) {
- is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
- }
-
- if((SI[0]=="S13.0E" && SI[3]=="14002") || (SI[0]=="S13.0E" && SI[3]=="14008") || (SI[0]=="S13.0E" && SI[3]=="17203") || (SI[0]=="S13.0E" && SI[3]=="17204") ) {
- //Swiss FRA channels
- is.setObject("cfg.locale.ui","fra",is.STORAGE_VOLATILE);
- }
-
- if((SI[0]=="S13.0E" && SI[3]=="17201") || (SI[0]=="S13.0E" && SI[3]=="17202") || (SI[0]=="S13.0E" && SI[3]=="901") || (SI[0]=="S13.0E" && SI[3]=="907") || (SI[0]=="S13.0E" && SI[3]=="911") ) {
- //Swiss GER channels
- is.setObject("cfg.locale.ui","ger",is.STORAGE_VOLATILE);
- }
-
- if((SI[0]=="S19.2E" && SI[2]=="1111" && SI[3]=="7290") ) {
- //Sky News on WDR HD transponder
- is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S19.2E" && ( (SI[2]=="1018") || (SI[2]=="1020") || (SI[2]=="1022") || (SI[2]=="1024") || (SI[2]=="1026") || (SI[2]=="1068") || (SI[2]=="1070") || (SI[2]=="1072") || (SI[2]=="1074") || (SI[2]=="1076") || (SI[2]=="1080") || (SI[2]=="1084") || (SI[2]=="1086") || (SI[2]=="1090") || (SI[2]=="1092") || (SI[2]=="1094") || (SI[2]=="1096") || (SI[2]=="1100") || (SI[2]=="1102") || (SI[2]=="1106") || (SI[2]=="1110") || (SI[2]=="1112") || (SI[2]=="1114") || (SI[2]=="1116") || (SI[2]=="1118") || (SI[2]=="1120"))) {
- //CanalSat S19.2
- is.setObject("cfg.locale.ui","fra",is.STORAGE_VOLATILE);
- }
-
- // MTV transponder 1078 / 1066
- if(SI[0]=="S19.2E" && SI[2]=="1078" && ( SI[3]=="28674" || SI[3]=="28675" || SI[3]=="28677" )) {
- //Nick JR France
- is.setObject("cfg.locale.ui","fra",is.STORAGE_VOLATILE);
- }
- if(SI[0]=="S19.2E" && SI[2]=="1078" && SI[3]=="28679") {
- //Nick NL
- is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
- }
- if(SI[0]=="S19.2E" && SI[2]=="1078" && ( SI[3]=="28673" || SI[3]=="28676" )) {
- //Deutsch
- is.setObject("cfg.locale.ui","ger",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S19.2E" && SI[2]=="1066") {
- is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
- }
- if(SI[0]=="S19.2E" && SI[2]=="1066" && ( SI[3]=="28652" || SI[3]=="28661" )) {
- is.setObject("cfg.locale.ui","fra",is.STORAGE_VOLATILE);
- }
-
- //Canal Sat
- if(SI[0]=="S19.2E" && SI[1]=="1" && SI[2]=="1088" ) {
- is.setObject("cfg.locale.ui","fre",is.STORAGE_VOLATILE);
- }
-
- if(SI[0]=="S13.0E" && SI[1]=="319") {
- is.setObject("cfg.locale.ui","fre",is.STORAGE_VOLATILE);
- }
-
- //Euronews / Eurosport
- if(SI[0]=="S13.0E" && SI[1]=="318" && SI[2]=="200") {
- is.setObject("cfg.locale.ui","fra",is.STORAGE_VOLATILE);
- }
-
- //bloomberg 19.2E
- if(SI[0]=="S19.2E" && SI[2]=="1026" && SI[3]=="10067") {
- is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
- }
-
- //Canal+
- if(SI[0]=="S19.2E" && SI[1]=="1" && SI[2]=="1060" ) {
- is.setObject("cfg.locale.ui","spa",is.STORAGE_VOLATILE);
- }
-
- //Russian
- if(SI[0]=="S13.0E" && SI[2]=="8100") {
- is.setObject("cfg.locale.ui","ger",is.STORAGE_VOLATILE);
- //doesn't work but dvbsnoop does show 'ISO639_2_language_code: ger'
- }
-
-
-}
-
-
-// End of EPG section
-
-
-
-// Channelslist / EPG Guide
-//
-// show currchan - 5
-// highlite currchan
-// show currchan + 5
-//
-// check if chan is OK
-//
-function showChannelList() {
- var liststyle = "";
- var htmlstring = "<table border='0'><tr>";
- listChan = currChan-5;
- for(var i=currChan-5; i<=currChan+5; i++) {
- do
- {
- listChan += 1;
- if (listChan<minChan[ChanGroup]) {
- listChan=maxChan[ChanGroup];
- }
- if (listChan>maxChan[ChanGroup]) {
- listChan=minChan[ChanGroup];
- }
- }
-
- while (!channels[listChan] && (listChan<maxChan[ChanGroup]));
- if (fullupdate) { GetEPG(listChan); }
- if ( listChan == currChan) {
- if (!fullupdate) { GetEPG(listChan); }
- liststyle = "background:" + color_bg + ";";
- } else {
- liststyle = "";
- }
- EpgInfo[0] = EPG[0][7][listChan];
- EpgInfo[1] = EPG[1][7][listChan];
- htmlstring = htmlstring + "<td style='" + liststyle + "font-size:" + fsList + ";'>\uE003\uE003" + listChan + "\uE003</td><td style='" + liststyle + "font-size:" + fsList + ";'>" + Left(channelsnames[listChan],15) + "\uE003</td><td style='" + liststyle + "font-size:" + fsList + ";'>" + Left(EpgInfo[NowNext],64) + "</td></tr>";
- }
- htmlstring = htmlstring + "</table>";
- channellist.innerHTML = htmlstring;
- chanlistepg.innerHTML = "<center><p style='" + color_chan_epg + ";font-size:" + fsEpg + ";'>" + EPG[NowNext][1][currChan] + "</p><p style='" + color_chan_epg + ";font-size:" + fsList + ";'>" + Left(EPG[NowNext][4][currChan],250) + "</p></center>" ;
-
-}
-
-
-// END of Channelslist / EPG Guide
-
-// TeleTXT section
-
-function embedTeletextPlugin() {
- teletext = document.createElement("embed");
- teletext.id = "teletext";
- teletext.type = "application/motorola-teletext-plugin";
- teletext.style.position = "absolute";
- teletext.style.width = "100%";
- teletext.style.height = "100%";
- teletext.style.top = "10px"; // has to be 1 rather than 0
- teletext.style.left = "10px"; // has to be 1 rather than 0
- teletext.style.zIndex = "501";
- return teletext;
-}
-
-
-function setVisible(isVisible) {
- if (isVisible) {
- videoplane.style.width = "50%";
- videoplane.style.left = "50%";
- document.body.appendChild(teletext);
- teletext.style.width = "50%";
- teletext.style.visibility = "visible";
- channellist.style.visibility = "hidden";
- colorkeys.style.visibility = "hidden";
- } else {
- teletext.style.visibility = "hidden";
- channellist.style.visibility = "visible";
- colorkeys.style.visibility = "visible";
- }
-}
-
-
-function onKeyTeletext(keyCode) {
- switch(keyCode) {
- case "Left":
- teletext.api.gotoNextPage();
- break;
- case "Right":
- teletext.api.gotoPreviousPage();
- break;
- case "Red":
- teletext.api.inputRedKey();
- break;
- case "Green":
- teletext.api.inputGreenKey();
- break;
- case "Yellow":
- teletext.api.inputYellowKey();
- break;
- case "Blue":
- teletext.api.inputCyanKey();
- break;
- case "MediaRewind":
- teletext.api.gotoPreviousSubpage();
- break;
- case "MediaForward":
- teletext.api.gotoNextSubpage();
- break;
- case "MediaStop":
- teletext.style.width = "100%";
- teletext.api.transparent = !teletext.api.transparent;
- FullScreen();
- break;
- case "BrowserBack":
- case "Teletext":
- isVisible = 0;
- FullScreen();
- setVisible(isVisible);
- break;
-
- case "TV":
- teletext.api.gotoIndexPage();
- break;
-
- case KEY_0:
- teletext.api.inputDigit(0);
- break;
- case KEY_1:
- teletext.api.inputDigit(1);
- break;
- case KEY_2:
- teletext.api.inputDigit(2);
- break;
- case KEY_3:
- teletext.api.inputDigit(3);
- break;
- case KEY_4:
- teletext.api.inputDigit(4);
- break;
- case KEY_5:
- teletext.api.inputDigit(5);
- break;
- case KEY_6:
- teletext.api.inputDigit(6);
- break;
- case KEY_7:
- teletext.api.inputDigit(7);
- break;
- case KEY_8:
- teletext.api.inputDigit(8);
- break;
- case KEY_9:
- teletext.api.inputDigit(9);
- break;
-
-
-
- }
-}
-
-// end of TeleTXT section
-
-
-// Menu section
-
-function onKeyMenu(keyCode) {
- switch(keyCode) {
- case "BrowserBack":
- if ((menu == 5 || menu == 7) && osdepginfo.style.opacity == 1) {
- osdepginfo.style.opacity = 0;
- } else if (menu == 10 || menu == MainMenu) {
- isSetupMenu = 0;
- mainmenu.style.opacity = 0;
- osdepginfo.style.opacity = 0;
- } else if (menu !== MainMenu) {
- if (menu == 3 ) { isFullscreen = 0; play(channels[currChan]); isFullscreen = 1;MPDListener = 0;}
- menu = MainMenu;
- InitMenu(menu);
- }
- break;
- case "Menu":
- if (menu == 3 ) { play(channels[currChan]);MPDListener = 0;}
- isSetupMenu = 0;
- mainmenu.style.opacity = 0;
- osdepginfo.style.opacity = 0;
- break;
-
- case "Left":
- break;
- case "Right":
- break;
- case "Up":
- if (menu == 2) {
- timerID -= 1;
- if (timerID < 1) { timerID = 1; }
- } else if (menu == 5 || menu == 7 || menu == 10) {
- timerID -= 1;
- if (timerID < 0) { timerID = 0; }
- }
- InitMenu(menu);
- break;
- case "Down":
- if (menu == 2) {
- timerID += 1;
- var x = ss.getBookingIds("*", 0, 0);
- if (timerID > x.length ) { timerID = x.length; }
- } else if (menu == 5 || menu == 7 || menu == 10) {
- timerID += 1;
- if (timerID > (maxTimers - 1) && maxTimers !== 0) { timerID = maxTimers - 1; }
- }
- InitMenu(menu);
- break;
- case KEY_OK:
- if (menu == 2 && isMediaMenu !== 1) {
- var x = ss.getBookingIds("*", 0, 0);
- try {
- recLink[0] = ss.getParameter(x[timerID-1], "assetURI");
- recGUID[0] = ss.getParameter(x[timerID-1], "assetId");
- recChan[0] = ss.getParameter(x[timerID-1], "Channel");
- recTitl[0] = ss.getParameter(x[timerID-1], "Title");
- recDura[0] = ss.getBooking(x[timerID-1]).duration;// Is updated if real length is different
- recStrt[0] = ss.getBooking(x[timerID-1]).start;
- recDesc[0] = ss.getParameter(x[timerID-1], "Info");
- recDummy[0] = x[timerID-1];
- resume_position = Number(ss.getParameter(x[timerID-1], "resume"));
- localRecording = 1;
- currMed = 0;
- getRecOK = 0;
- LoadMediaSettings();
- isSetupMenu = 0;
- medialist.style.opacity = 0;
- mainmenu.style.opacity = 0;
- playRec(recLink[0],resume_position);
- } catch(e) {
- alert("error : " + e);
- }
- }
- if (menu == 10) {
- GotoFav((timerID + Fav_base + 1));
- isSetupMenu = 0;
- mainmenu.style.opacity = 0;
- osdepginfo.style.opacity = 0;
- }
- if (menu == 5) {
- // Show EPG info Timer
- osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
- osdepginfo.innerHTML = "<center><pre style='" + color_timerinfo + ";'>\n\n\n" + Lang[0] + "\n\n\n </pre></center>" ;
- setTimeout("ShowTimerInfo();",100);
- }
- if (menu == 7) {
- // Show more info Current SearchTimer
- osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
- osdepginfo.innerHTML = "<center><pre style='" + color_main_head + ";'>" + searchtimersSearch[timerID] + "\n\n\n\n<center>" + Lang[0] + "</center></pre>" ;
- setTimeout("ShowSearchTimerInfo();",100);
- }
-
- break;
- case "Red":
- if (menu == 1) {
- if (subs_dyn < (subs_prio_dyn.length -1)) { subs_dyn += 1} else { subs_dyn = 0 }
- if (subs_prio_dyn.length > 0) {
- is.setObject("cfg.media.subtitling.languagepriority", (subs_prio_dyn[subs_dyn] + "," + subs_prio),is.STORAGE_PERMANENT);
- } else {
- is.setObject("cfg.media.subtitling.languagepriority",subs_prio,is.STORAGE_PERMANENT);
- }
- InitMenu(menu);
- break;
- } else if (menu == 2) {
- var x = ss.getBookingIds("*", 0, 0);
- if (x.length > 0) {
- if (mediaRecorder) {
- try {
- if (ss.getParameter(x[timerID-1], "active") == "True") {
- ss.setParameter(x[timerID-1], "active", "False");
- mediaRecorder.close();
- }
- } catch (e) {
- alert(e);
- }
-
- try {
- ams.removeAsset(rma, ss.getParameter(x[timerID-1], "assetId"));
- } catch(e) {
- alert("Error remove asset" + e);
- }
- }
-
- //Remove timer from schedule DB
-
- ss.remove(x[timerID-1]);
- timer[timerID] = "";
- timerID -= 1; if (timerID < 1) { timerID = 1;}
- LoadTimers();
- //if (timer.length !== 0) { do { timerID = timerID + 1; } while (!timer[timerID] && (timerID < timer.length)) }
- setOSDtimer();
- InitMenu(menu);
- }
- } else if (menu == 5 && smartTVplugin) {
- osdepginfo.style.opacity = 0;
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n\n\n<center>" + Lang[0] + "</center></pre>";
- DeleteTimers();
- setTimeout("LoadTimersServer();InitMenu(menu);",100);
- } else if (menu == 10) {
- channels[(timerID + Fav_base + 1)]="";
- channelsnames[(timerID + Fav_base + 1)]="";
- is.setObject(("vip.channelsnames." + (timerID + 1)),"",is.STORAGE_PERMANENT)
- is.setObject(("vip.channels." + (timerID + 1)),"",is.STORAGE_PERMANENT)
- if (Fav_max_channel == (timerID + 1)) {
- Fav_max_channel = timerID;
- maxTimers = Fav_max_channel;
- is.setObject("vip.fav_max_channel",Fav_max_channel.toString(),is.STORAGE_PERMANENT)
- timerID -= 1; if (timerID < 0) {timerID = 0;}
- }
- setTimeout("InitMenu(menu);",100);
- }
- break;
- case "Green":
- if (menu == 1) {
- Set_Res = Set_Res + 1;
- if (Set_Res > (VideoOutputModes.length-1)) { Set_Res = 0;}
- // save the info
- is.setObject("vip.resolution",Set_Res.toString(),is.STORAGE_PERMANENT)
-
- VideoOutput();
- InitMenu(menu);
- } else if (menu == 2 && mediaRecorder) {
- var x = ss.getBookingIds("*", 0, 0);
- if (ss.getBooking(x[timerID-1]).category == "RecLocal") {
- ss.reschedule(x[timerID-1],"SwitchOnly","notification",ss.getBooking(x[timerID-1]).start,ss.getBooking(x[timerID-1]).duration)
- } else if (ss.getBooking(x[timerID-1]).category == "SwitchOnly") {
- ss.reschedule(x[timerID-1],"RecLocal","record_hd_from_ip",ss.getBooking(x[timerID-1]).start,ss.getBooking(x[timerID-1]).duration)
- }
- LoadTimers();
- InitMenu(menu);
- } else if (menu == 5 && smartTVplugin) {
- activate_timers(timerID);
- InitMenu(menu);
- } else if (menu == 10) {
- //move up
- if (timerID !== 0) {
- x = timerID + Fav_base + 1;
- x1 = channels[x];
- y1 = channelsnames[x];
- x2 = channels[(x - 1)];
- y2 = channelsnames[(x - 1)];
- is.setObject(("vip.channelsnames." + (timerID + 1)),y2,is.STORAGE_PERMANENT)
- is.setObject(("vip.channels." + (timerID + 1)),x2,is.STORAGE_PERMANENT)
- is.setObject(("vip.channelsnames." + timerID),y1,is.STORAGE_PERMANENT)
- is.setObject(("vip.channels." + timerID),x1,is.STORAGE_PERMANENT)
- channelsnames[x] = y2;
- channels[x] = x2;
- channelsnames[(x - 1)] = y1;
- channels[(x - 1)] = x1;
- timerID -= 1;
- setTimeout("InitMenu(menu);",100);
- }
- }
- break;
- case "Yellow":
- if (menu == MainMenu) {
- menu = 4; // INFO menu
- InitMenu(menu);
- } else if (menu == 1) {
- menu = 9; // INFO2 menu
- InitMenu(menu);
- } else if (menu == 10) {
- //move down
- if (timerID !== (maxTimers - 1)) {
- x = timerID + Fav_base + 1;
- x1 = channels[x];
- y1 = channelsnames[x];
- x2 = channels[(x + 1)];
- y2 = channelsnames[(x + 1)];
- is.setObject(("vip.channelsnames." + (timerID + 1)),y2,is.STORAGE_PERMANENT)
- is.setObject(("vip.channels." + (timerID + 1)),x2,is.STORAGE_PERMANENT)
- is.setObject(("vip.channelsnames." + (timerID + 2)),y1,is.STORAGE_PERMANENT)
- is.setObject(("vip.channels." + (timerID + 2)),x1,is.STORAGE_PERMANENT)
- channelsnames[x] = y2;
- channels[x] = x2;
- channelsnames[(x + 1)] = y1;
- channels[(x + 1)] = x1;
- timerID += 1;
- setTimeout("InitMenu(menu);",100);
- }
- }
- break;
- case "Blue":
- if (menu == 0) {
- RestartPortal();
- } else if (menu == 2) {
- // Show Info local timer/ recording
- var x = ss.getBookingIds("*", 0, 0);
- var y = Number(ss.getParameter(x[timerID-1], "Channel"));
- osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
- osdepginfo.innerHTML = "<center><pre style='" + color_timerinfo + ";'>" + ss.getParameter(x[timerID-1], "Title") + "\n " + "\n" + y + " - " + channelsnames[y] + "(" + ss.getParameter(x[timerID-1], "Eventid") + ")" + "\n </pre><p style='" + color_epg_info + ";'>" + ss.getParameter(x[timerID-1], "Info") + "</p></center>" ;
- } else if (menu == 5) {
- // Show EPG info Timer
- osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
- osdepginfo.innerHTML = "<center><pre style='" + color_timerinfo + ";'>\n\n\n" + Lang[0] + "\n\n\n </pre></center>" ;
- setTimeout("ShowTimerInfo();",100);
- } else if (menu == 7) {
- // Show info SearchTimers
- osdepginfo.innerHTML = SearchTimer[timerID] ;
- osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
- } else if (menu == 10) {
- if (protChn[ChanGroup] !== 1 && ChanGroup !== Fav_group) {
- AddtoFav();
- }
- }
- break;
- case "MediaRewind":
- if (menu == 1) {
- if (experimental) { // mute output 0 (analog out), keep output 3 'decoder output' unmuted
- aos.setVolume(0, 0);
- }
- }
- break;
- case "MediaForward":
- if (menu == 1) {
- if (experimental) { aos.setVolume(0, 100); }
- }
-
- break;
- case "MediaStop":
- if (menu == 1) {
- //set sleep timer.
- SleepTimer += 15;
- if (SleepTimerID != -1) {
- clearTimeout(SleepTimerID);
- SleepTimerID = -1;
- }
- if (SleepTimer > 90) {
- SleepTimer = 0;
- } else {
- SleepTimerID = setTimeout("SleepTimer = 0;toi.platformService.setStandby(true);", (SleepTimer * 60 * 1000));
- }
- } else if (menu == 2) {
- var x = ss.getBookingIds("*", 0, 0);
- var y = Number((new Date().getTime()/1000).toFixed(0)) + 2;
- //stop current recording after 2 sec.
- ss.reschedule(x[timerID-1],"RecLocal","record_hd_from_ip", y , 0)
- ss.setParameter(x[timerID-1], "Type", "\uE01C");
- LoadTimers();
- }
- InitMenu(menu);
- break;
- case "Teletext":
- break;
- case "TV":
- break;
- case KEY_1:
- if (menu == MainMenu) {
- menu = 1;
- } else if (menu == 1) {
- ShowSubs = 1 - ShowSubs;
- videoplane.subtitles = Boolean(ShowSubs); // Enable subtitles or Disable subtitles
- is.setObject("vip.showsubs",ShowSubs.toString(),is.STORAGE_PERMANENT);
- } else if (menu == 8) {
- SetGroup(1);
- }
-
- InitMenu(menu);
- break;
- case KEY_2:
- if (menu == MainMenu) {
- LoadTimers();
- timerID = 1;
- //if (timer.length !== 0) { do { timerID += 1; } while (!timer[timerID] && (timerID < timer.length)) }
- menu = 2;
- }
-
- if (menu == 1) {
- if(subsmode == 0 ) {
- is.setObject("cfg.media.subtitling.modepriority","Teletext,DVB",is.STORAGE_PERMANENT);
- subsmode = 1;
- } else {
- is.setObject("cfg.media.subtitling.modepriority","DVB,Teletext",is.STORAGE_PERMANENT);
- subsmode = 0;
- }
- }
-
- if (menu == 8) {
- SetGroup(2);
- }
- InitMenu(menu);
- break;
- case KEY_3:
- if (menu == 0) {
- isSetupMenu = 0;
- medialist.style.opacity = 0.9;
- mainmenu.style.opacity = 0;
- setTimeout("getSchedule(currChan);LoadMediaSettings();",100);
- } else if (menu == 1) {
- if (audio < (lang_prio.length -1)) { audio += 1} else { audio = 0 }
- is.setObject("vip.languagepriority",audio.toString(),is.STORAGE_PERMANENT);
- is.setObject("cfg.media.audio.languagepriority",lang_prio[audio],is.STORAGE_PERMANENT);
- InitMenu(menu);
- } else if (menu == 8) {
- SetGroup(3);
- InitMenu(menu);
- }
-
- break;
- case KEY_4:
- if (menu == 0) {
- isSetupMenu = 0;
- medialist.style.opacity = 0.9;
- mainmenu.style.opacity = 0;
- recPath = "/recordings.xml";
- setTimeout("getRecList();LoadMediaSettings();",100);
- } else if (menu == 1) {
- //Init here. menu = 0 don't need init!
- menu = 8;
- InitMenu(menu);
- } else if (menu == 8) {
- SetGroup(4);
- InitMenu(menu);
- }
-
- break;
- case KEY_5:
- if (menu == MainMenu && (Restfulapiplugin || smartTVplugin)) {
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n\n\n<center>" + Lang[0] + "</center></pre>";
- timerID = 0;
- menu = 5;
- setTimeout("LoadTimersServer();InitMenu(menu);",200);
- }
-
- if (menu == 1) {
- var x = is.getObject("vip.serveraddress");
- x = Number(x);
- if (x < (server_ip_array.length -1)) { x += 1} else { x = 0 }
- is.setObject("vip.serveraddress",x.toString(),is.STORAGE_PERMANENT);
-
- server_ip = server_ip_array[x];
- for (var i=0;i<10;i++) {
- if (ServerAdres[i] !== "FullURL" && ServerAdres[i] !== "MultiCast") {ServerAdres[i] = server_ip + StreamPort;}
- }
- InitMenu(menu);
- }
-
- if (menu == 8) {
- SetGroup(5);
- InitMenu(menu);
- }
- break;
- case KEY_6:
- if (menu == 0 && Restfulapiplugin) {
- isSetupMenu = 0;
- medialist.style.opacity = 0.9;
- mainmenu.style.opacity = 0;
- setTimeout("getServerSchedule();LoadMediaSettings();",100);
- }
-
- if (menu == 1) {
- if(showClock == 0 ) {
- showDisplay("", true, 80, 1 );
- showClock = 1;
- } else if(showClock == 1 ) {
- showClock = 0;
- showDisplay(Right(currChan.toString(),4), false, 100, 0 );
- }
- InitMenu(menu);
- }
- if (menu == 8) {
- SetGroup(6);
- InitMenu(menu);
- }
-
- break;
- case KEY_7:
- if (menu == 0 && smartTVplugin) {
- isSetupMenu = 0;
- medialist.style.opacity = 0.9;
- mainmenu.style.opacity = 0;
- recPath = "/media.xml";
- setTimeout("getRecList();LoadMediaSettings();",100);
- }
-
-
- if (menu == 1) {
- ShowProtectedChannels = 1 - ShowProtectedChannels;
- if (ProtectID) { clearTimeout(ProtectID); }
- if (ShowProtectedChannels == 0 && ProtectTimeOut !== 0 ) {
- ProtectID = setTimeout("ShowProtectedChannels = 1; if (protChn[ChanGroup] == 1) {ChanGroup = 0; currChan = defChan[ChanGroup]; play(currChan); }",ProtectTimeOut);
- }
- if (ShowProtectedChannels == 1 && protChn[ChanGroup] == 1) { ChanGroup = 0; currChan = defChan[ChanGroup]; play(currChan); }
- isSetupMenu = 0;
- mainmenu.style.opacity = 0;
- }
- if (menu == 8) {
- SetGroup(7);
- InitMenu(menu);
- }
-
- break;
- case KEY_8:
- if (menu == MainMenu && Restfulapiplugin) {
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[8] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n\n\n<center>" + Lang[0] + "</center></pre>";
- timerID = 0;
- menu = 7;
- setTimeout("LoadSearchTimersServer();InitMenu(menu);",200);
- }
- if (menu == 1) {
- if(SwitchGuide == 0 ) {
- SwitchGuide = 1;
- } else if(SwitchGuide == 1 ) {
- SwitchGuide = 0;
- }
- InitMenu(menu);
- }
- if (menu == 8) {
- SetGroup(8);
- InitMenu(menu);
- }
-
-
- break;
- case KEY_9:
- if ((menu == 0 || menu == 3) && ShowMPD) {
- menu = 3;
- playMPD(server_ip + MPDAddress);
- } else if (menu == 1) {
- if (lang_nr < (OSDLang.length -1)) { lang_nr += 1} else { lang_nr = 0 }
- is.setObject("vip.OSDlanguage",lang_nr.toString(),is.STORAGE_PERMANENT);
- loadjs(langfile[lang_nr]);
- setTimeout("InitMenu(menu);",100);
- } else if (menu == 8) {
- SetGroup(9);
- }
-
- InitMenu(menu);
- break;
- case KEY_0:
- if (menu !== MainMenu && menu !== 8 ) {
- if (menu == 3 ) { isFullscreen = 0; play(channels[currChan]); isFullscreen = 1; MPDListener = 0;}
- menu = MainMenu;
- InitMenu(menu);
- } else if (menu == 8) {
- SetGroup(0);
- InitMenu(menu);
- } else if (menu == 0) {
- timerID = 0; maxTimers = Fav_max_channel;
- menu = 10; if (ChanGroup !== Fav_group) { Fav_key1 = Lang[86]; }
- InitMenu(menu);
- }
-
- break;
- case "VolumeMute":
- VolumeMute();
- break;
- case "VolumeUp":
- VolumeUp();
- break;
- case "VolumeDown":
- VolumeDown();
- break;
- case KEY_A:// |> key on old long kpn 1710/1760 remote
- break;
- case KEY_B:// hh key on old long kpn 1710/1760 remote
- break;
- case KEY_C:// @ key on old long kpn 1710/1760 remote
- if (menu == 10 ) {
- isSetupMenu = 0;
- mainmenu.style.opacity = 0;
- osdepginfo.style.opacity = 0;
- }
- break;
- case KEY_D:// >@ key on old long kpn 1710/1760 remote
- break;
-
- default:
- break;
- }
-}
-
-
-function InitMenu(menu) {
-
-// 0 = Main Menu
-// 1 = settings menu
-// 2 = Timers menu
-// 3 = MPD Menu
-// 4 = INFO Menu
-// 5 = Timers from Server
-// 6 = Main Menu (when watching recording)
-// 7 = SearchTimers from Server
-// 8 = ChannelGroups enable/disable
-// 9 = INFO2 menu
-// 10 = Favorite Edit menu
-
-osdepginfo.style.opacity = 0;
-
-if(menu == 0) { // Main Menu
- MainMenu = 0;
- var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[9] + "\n ( " + Version + " )</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'> 1 -" + Lang[10] + "\n 2 -" + Lang[7] + "\n 3 -" + Lang[11];
- htmltext += "\n 4 -" + Lang[12];
- if (Restfulapiplugin) {
- htmltext += "\n 5 -" + Lang[13];
- } else {
- htmltext += "<font style='" + color_notset +";'>" + "\n 5 -" + Lang[13] + "<font style='" + color_main_font +";'>" ;
- }
- if (Restfulapiplugin) {
- htmltext += "\n 6 -" + Lang[14];
- } else {
- htmltext += "<font style='" + color_notset +";'>" + "\n 6 -" + Lang[14] + "<font style='" + color_main_font +";'>" ;
- }
- if (smartTVplugin) {
- htmltext += "\n 7 -" + Lang[15];
- } else {
- htmltext += "<font style='" + color_notset +";'>" + "\n 7 -" + Lang[15] + "<font style='" + color_main_font +";'>" ;
- }
- if (Restfulapiplugin) {
- htmltext += "\n 8 -" + Lang[16];
- } else {
- htmltext += "<font style='" + color_notset +";'>" + "\n 8 -" + Lang[16] + "<font style='" + color_main_font +";'>" ;
- }
- if (ShowMPD) {
- htmltext += "\n 9 -" + Lang[17];
- } else {
- htmltext += "<font style='" + color_notset +";'>" + "\n 9 -" + Lang[17] + "<font style='" + color_main_font +";'>" ;
- }
-
- htmltext += "\n 0 - " + Lang[83] + "\n\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[35] + " <font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[18] + "</pre>";
- mainmenu.innerHTML = htmltext;
-}
-
-if(menu == 6) { // Main Menu when watching recording
- MainMenu = 6;
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[9] + "\n ( " + Version + " )</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'> 1 -" + Lang[10] + "\n 2 -" + Lang[7] + "\n\n\n 5 -" + Lang[13] + "\n\n\n 8 -" + Lang[16] + "\n\n\n\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[35] + " <font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "</pre>";
-}
-
-
-if(menu == 1) { // settings menu
- var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[10] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'> 1 - ";
- if (ShowSubs) { htmltext += "\uE017"; } else { htmltext += "\uE016"; }
- htmltext += Lang[20] + ": " + (is.getObject("cfg.media.subtitling.languagepriority"));
- if (subs_prio_dyn.length > 0) { htmltext += " (" + (subs_dyn + 1 ) + "/" + subs_prio_dyn.length + ") "; }
- htmltext += "\n 2 - \uE003" + Lang[22] + (is.getObject("cfg.media.subtitling.modepriority"));
- htmltext += "\n 3 - \uE003" + Lang[24] + (is.getObject("cfg.media.audio.languagepriority"));
- htmltext += "\n 4 - " + Lang[82] + "\n 5 - VDR : " + server_ip + "\n 6 - ";
- if (showClock) { htmltext += "\uE017"; } else { htmltext += "\uE016"; }
- htmltext += Lang[25] + "\n 7 - ";
- if (ShowProtectedChannels) { htmltext += "\uE017"; } else { htmltext += "\uE016"; }
- htmltext += Lang[26] + "\n 8 - ";
- if (SwitchGuide) { htmltext += "\uE017"; } else { htmltext += "\uE016"; }
- htmltext += Lang[27] + "\n 9 -" + Lang[23] + OSDLang[lang_nr] + "\n \u25AA -" + Lang[29];
-
- if (SleepTimer) { htmltext += SleepTimer + Lang[30]; } else { htmltext += Lang[31]; }
-
- htmltext += "\n\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[20];
- htmltext += "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> - " + VideoOutputModes_txt[VideoOutputModes[Set_Res]] + " ";
- htmltext += "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[35];
- htmltext += "<font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] +"</pre>";
-// htmltext += "\n 0 -" + Lang[9] +"</pre>";
- mainmenu.innerHTML = htmltext;
-}
-
-if(menu == 2) { // Timers menu
- booking = "";
- var x = timerID - 2;
- var y = ss.getBookingIds("*", 0, 0);
- if (y.length !== 0) {
- for (var i=0;i<10;i++) {
- if (timer.length !== 0) { do { x += 1; } while (!timer[x] && (x < timer.length)) }
-
- if (i == 0) {
- booking += "<font style='background:" + color_bg + ";-webkit-border-radius:25px;" + color_main_font + ";font-size:" + fsMenu + ";'>";
- } else if (i == 1) {
- booking += "</font>";
- }
-
- if (timer.length > x) {
- try {
- if (ss.getParameter(y[x], "assetURI")) {
- // test if there is a file with the timer if so more info is added
- if (Number(ss.getParameter(y[x], "resume")) == 0 ) {
- booking += "\uE003\uE010";
- } else {
- booking += "\uE003\uE003";
- }
- }
- } catch(e) {
- booking += "\uE003\uE003";
- }
- booking += ss.getParameter(y[x], "Type");
- booking += timer[x];
- } else {
- booking += "\n";
- }
- }
- }
- if (mediaRecorder) { var x = NN[3]; } else { var x = Lang[19]; }
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n 0 -" + Lang[9] + "\n" + booking + " <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[48] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> - " + x + " <font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> - " + NN[5] + "</pre>";
-}
-
-if(menu == 3) { // MPD Menu
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[33] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>" + Lang[34] + "\n 0 -" + Lang[9] + "</pre>";
-}
-
-if(menu == 4) { // INFO Menu
- var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[35] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>";
- try {
- htmltext += "\n Product name: " + is.getObject("config.productdisplayname");
- htmltext += "\n Build date : " + is.getObject("config.build.date");
- htmltext += "\n\n IP address : " + is.getObject("config.ipaddress");
-
- var x = is.getObject("cfg.ip.eth0.mode");
- if (x == "DHCP") { htmltext += "\n \uE003\uE017 "; } else { htmltext += "\n \uE003\uE016 "; }
- htmltext += "DHCP";
- var x = is.getObject("var.capabilities.dvr");
- if (x !== "FALSE") { htmltext += "\n \uE003\uE017 "; } else { htmltext += "\n \uE003\uE016 "; }
- htmltext += "DVR \n";
- htmltext += "\n VDR address : " + server_ip;
- htmltext += "\n Vip Client\uE003\uE003\uE003: " + Version;
- htmltext += "\n Channel list\uE003: " + Chan_Ver;
-
- } catch(e) {
- alert("Error : " + e);
- }
- htmltext += "\n\n 0 -" + Lang[9] + "</pre>";
- mainmenu.innerHTML = htmltext;
-
-}
-
-if(menu == 5) { // Timers from Server
- if (timerOK) {
- // booking = "<center>" + Lang[32] + "</center>";
- booking = "<font style='background:" + color_bg + ";-webkit-border-radius:25px;" + color_main_font + ";font-size:" + fsMenu + ";'>";
- var x = timerID - 1;
- for (var i=0;i<10;i++) {
- if (maxTimers !== 0) { do { x += 1; } while (!timers[x] && (x < maxTimers)) }
- if (maxTimers > x) { booking += timers[x]; } else { booking += "\n"; }
- if (i == 0) { booking += "</font>"; }
- }
- if (get_timer) {
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n" + booking + "\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[48] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[49] + "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + " <font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[28] + "</pre>";
- } else {
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n" + booking + "\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + " <font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[28] + "</pre>";
- }
- }
-}
-
-
-if(menu == 7) { // SearchTimers from Server
- if (timerOK) {
- // booking = "<center>" + Lang[32] + "</center>";
- booking = "<font style='background:" + color_bg + ";-webkit-border-radius:25px;" + color_main_font + ";font-size:" + fsMenu + ";'>";
- var x = timerID - 1;
- for (var i=0;i<10;i++) {
- if (maxTimers !== 0) { do { x += 1; } while (!searchtimers[x] && (x < maxTimers)) }
- if (maxTimers > x) { booking += searchtimers[x]; } else { booking += "\n"; }
- if (i == 0) { booking += "</font>"; }
- }
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[8] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n" + booking + "\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + " <font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[28] + "</pre>";
-
- }
-}
-
-if(menu == 8) { // ChannelGroups enable/disable
- var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[80] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n";
- for (var i=0;i<10;i++) {
- if (maxChan[i]) {
- htmltext += "<font style='" + color_main_font + ";'>";
- } else {
- htmltext += "<font style='" + color_notset + ";'>";
- }
-
- htmltext += "\uE003" + i + "\uE003-\uE003";
- if (is.getObject(("vip.group." + i)) == "1") { htmltext += "\uE017"; } else { htmltext += "\uE016"; }
- htmltext += "\uE003" + Lang[81] + i + "\n";
- }
- htmltext += "</pre>";
- mainmenu.innerHTML = htmltext;
- }
-
-if(menu == 9) { // INFO2 Menu
- var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[35] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>";
- try {
- if (fullupdate !== 0) { htmltext += "\n \uE017 "; } else { htmltext += "\n \uE016 "; }
- htmltext += "Full EPG Update ";
-
- experimental = Number(is.getObject("vip.testing"));
- if (experimental) { htmltext += "\n \uE017 "; } else { htmltext += "\n \uE016 "; }
- htmltext += "Experimental";
- if (Number(is.getObject("vip.testing2"))) { htmltext += "\n \uE017 "; } else { htmltext += "\n \uE016 "; }
- htmltext += "Experimental 2 (Info box 'not in package')";
- if (Restfulapiplugin) { htmltext += "\n \uE017 "; } else { htmltext += "\n \uE016 "; }
- htmltext += "Has Restfulapiplugin"
- if (smartTVplugin) { htmltext += "\n \uE017 "; } else { htmltext += "\n \uE016 "; }
- htmltext += "Has smartTVplugin"
- htmltext += "\n gettimers from";
- if (get_timer == 1) {
- htmltext += " smarttvweb ";
- } else {
- htmltext += " restfulapi ";
- }
-
- htmltext += "\n getmarks from";
- if (get_marks == 1) { htmltext += " smarttvweb "; } else { htmltext += " restfulapi "; }
- htmltext += "\n getrecordings from";
- if (get_recordings == 1) {
- htmltext += " smarttvweb ";
- } else if (get_recordings == 0) {
- htmltext += " restfulapi ";
- } else {
- htmltext += " streamdev ";
- }
- htmltext += "\n EPGMode : "
- if (EPGMode) { htmltext += "Full EPG"; } else { htmltext += "Now/Next Only"; }
- } catch(e) {
- alert("Error : " + e);
- }
- htmltext += "\n\n 0 -" + Lang[9] + "</pre>";
- mainmenu.innerHTML = htmltext;
-
-}
-
-if(menu == 10) { // Favorite edit Menu
- var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[83]
- htmltext += "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n"
- htmltext += "<font style='background:" + color_bg + ";-webkit-border-radius:25px;" + color_main_font + ";font-size:" + fsMenu + ";'>";
- var x = timerID;
- for (var i=0;i<10;i++) {
- if (maxTimers !== 0) { x += 1;}
- if (maxTimers >= x && x !== 0) { htmltext += " \u0003\u0003 " + x + " \u0003\u0003 " + channelsnames[(x + Fav_base)] + " \u0003\u0003\u0003 \n"; } else { htmltext += "\n"; }
- if (i == 0) { htmltext += "</font>"; }
- }
- htmltext += "\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[87];
- htmltext += "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -"
- if (timerID == 0) { htmltext += Lang[19] } else { htmltext += Lang[84] } //no move up
- htmltext += "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -"
- if (timerID == (maxTimers - 1) || x == 0) { htmltext += Lang[19] } else { htmltext += Lang[85] } //no move down
- htmltext += "<font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Fav_key1 + "</pre>";
- mainmenu.innerHTML = htmltext;
-}
-
-} // end of initmenu
-
-function SetGroup(isgroup) {
- is.setObject("vip.group." + isgroup,(1 - is.getObject("vip.group." + isgroup)).toString(),is.STORAGE_PERMANENT);
- if (is.getObject("vip.group." + isgroup) == "0") { minChan[isgroup] = "";} else {minChan[isgroup] = minchan[isgroup];}
-}
-
-function LoadTimers() {
- timer.length = 0;
- var booking = "";
- var x = ss.getBookingIds("*", 0, 0);
- for (var i=0;i<x.length;i++) {
- var y = ss.getBooking(x[i]);
- booking = " ID " + x[i];
- booking += " " + Left(y.category,1);
- tijd = y.start;
- date = new Date(tijd*1000);
- tijd = date.toUTCString();
- tijd = new Date(tijd);
- month = tijd.getMonth();
- d = tijd.getDate();
- day = tijd.getDay();
- var tm = tijd.getMinutes();
- var th = tijd.getHours();
- th=addzero(th);
- tm=addzero(tm);
-
-// booking += " Start " + Left(days[day],3) + " " + d + " " + Left(months[month],3) + " " + th + ":" + tm + " " + (y.duration/60).toFixed(0) + " min";
- booking += " " + d + " " + Left(months[month],3) + " " + th + ":" + tm + " " + (y.duration/60).toFixed(0) + " min";
-
- booking += " " + Left(channelsnames[ss.getParameter(x[i], "Channel")],8);
- booking += " " + Left(ss.getParameter(x[i], "Title"),15);
- timer[i] = booking + "\n" ;
-
- }
-}
-
-
-function LoadTimersServer() {
-try {
-
- if (get_timer==1) {
- //Get timers from SmartTVweb
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + recServ + "/timers.xml?" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- var x=xmlDoc.getElementsByTagName("timer");
- maxTimers = x.length;
- timers.length = 0; // clear timers[i] tries to clear crap if current x.length < previous x.length
- if (x.length > 0) {
- for (var i=0;i<x.length;i++)
- {
- var fill = "\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003";
- timersFlag[i] = x[i].getElementsByTagName("flags")[0].childNodes[0].nodeValue;
- timersStrt[i] = Right("000" + x[i].getElementsByTagName("start")[0].childNodes[0].nodeValue,4);
- timersStop[i] = Right("000" + x[i].getElementsByTagName("stop")[0].childNodes[0].nodeValue,4);
-
- timersEvnt[i] = x[i].getElementsByTagName("eventid")[0].childNodes[0].nodeValue; // event_id
- timersID[i] = x[i].getElementsByTagName("index")[0].childNodes[0].nodeValue; // index
- timersChan[i] = x[i].getElementsByTagName("channelid")[0].childNodes[0].nodeValue; // channel_id
- timersName[i] = x[i].getElementsByTagName("channelname")[0].childNodes[0].nodeValue + fill;
- timersDay[i] = x[i].getElementsByTagName("day")[0].childNodes[0].nodeValue;
- timersDays[i] = new Date(timersDay[i]*1000);
- timersDays[i] = timersDays[i].getDate() + "\uE003" + Left(months[timersDays[i].getMonth()],4);
- timersFile[i] = x[i].getElementsByTagName("file")[0].childNodes[0].nodeValue + fill + fill;
-
- if (timersFlag[i] == "1") {
- timers[i] = "\uE003\uE00C\uE003";
- } else if (timersFlag[i] == "9" || timersFlag[i] == "11" ) {
- timers[i] = "\uE003\uE00B\uE003";
- } else if (timersFlag[i] == "0") {
- timers[i] = "\uE003\uE003\uE003";
- } else {
- timers[i] = "\uE003?\uE003";
- }
-
- timers[i] += timersDays[i] + "\uE003" + timersStrt[i] + "\uE003" + timersStop[i] + "\uE003" + Left(timersName[i],8) + "\uE003" + Left(timersFile[i],15) + "\n" ;
- }
- }
- timerOK = 1;
- } else if (get_timer == 0) {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + RestFulAPI + "/timers.xml"),false); // ?" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- var x=xmlDoc.getElementsByTagName("timer");
- maxTimers = x.length;
- timers.length = 0; // clear timers[i] tries to clear crap if current x.length < previous x.length
- if (x.length > 0) {
- 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;
- timersChan[i] = x[i].getElementsByTagName("param")[11].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);
- timersEvnt[i] = x[i].getElementsByTagName("param")[8].childNodes[0].nodeValue;
- 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] += "\uE003\uE003\uE003";
- }
- timersName[i] = x[i].getElementsByTagName("param")[15].childNodes[0].nodeValue + fill;
- timersFile[i] = x[i].getElementsByTagName("param")[14].childNodes[0].nodeValue + fill + fill;
- if (timersFlag[i] == "1") {
- timers[i] = "\uE003\uE00C\uE003";
- } else if (timersFlag[i] == "9") {
- timers[i] = "\uE003\uE00B\uE003";
- } else {
- timers[i] = "\uE003\uE003\uE003";
- }
- timers[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);
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'><center>\n " + Lang[36] + ": \n " + server_ip + "</center></pre>";
- }
-}
-
-function DeleteTimers() {
-if (get_timer==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);
- 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 (get_timer==1) {
- // (De)activate timers.
- try {
-
- xmlhttp=new XMLHttpRequest();
- if (timersFlag[timerID] == "0") {
- xmlhttp.open("GET",(server_ip + recServ + "/activateTimer?index=" + timersID[timerID] + "&activate=true&" + new Date().getTime()),false);
- } else {
- xmlhttp.open("GET",(server_ip + recServ + "/activateTimer?index=" + timersID[timerID] + "&activate=false&" + new Date().getTime()),false);
- }
- xmlhttp.send();
-
- if (timersFlag[timerID] == "0") {
- timers[timerID] = timers[timerID].substr(0, 1) + "\uE00C" + timers[timerID].substr(2);
- timersFlag[timerID] = "1"
- } else {
- timers[timerID] = timers[timerID].substr(0, 1) + "\uE003" + timers[timerID].substr(2);
- timersFlag[timerID] = "0"
- }
- } catch(e) {
- alert("(De)Activate Timers problem: " + e);
- }
- }
-}
-
-
-function ShowTimerInfo() {
- if (osdepginfo.style.opacity == 1) {
- //Like Show EPG Info
- //setup some dummy vars
- var info1 = ""; var info2 = ""; var info3 = ""; var info4="";
- if (timersEvnt[timerID] > 0) {
-
- try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + RestFulAPI + "/events/" + timersChan[timerID] + "/" + timersEvnt[timerID] + ".xml?" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- var x=xmlDoc.getElementsByTagName("event");
- // x[0].getElementsByTagName("param")[1].childNodes[0].nodeValue --> Title
- // x[0].getElementsByTagName("param")[2].childNodes[0].nodeValue --> Short_text
- // x[0].getElementsByTagName("param")[3].childNodes[0].nodeValue --> Description
- // x[0].getElementsByTagName("param")[5].childNodes[0].nodeValue --> ChannelsName
-
- info1 = x[0].getElementsByTagName("param")[1].childNodes[0].nodeValue;
- info2 = x[0].getElementsByTagName("param")[5].childNodes[0].nodeValue;
- info4 = x[0].getElementsByTagName("param")[3].childNodes[0].nodeValue;
- info3 = x[0].getElementsByTagName("param")[2].childNodes[0].nodeValue + "</p><p>";
-
- } catch(e) {
- alert("Get EPG problem: " + e);
-
- }
- } else {
- info3 = Lang[37];
- }
- osdepginfo.innerHTML = "<center><pre style='" + color_timerinfo + ";'>" + Left(info1,60) + "\n " + timersDays[timerID] + " " +
- timersStrt[timerID] + " - " + timersStop[timerID] + "\n" + info2 + "\n </pre><p>" + info3 + Left(info4,750) + "</p></center>" ;
- }
-}
-
-function LoadSearchTimersServer() {
-try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + RestFulAPI + "/searchtimers.xml?" + new Date().getTime()),false); //"),false); //
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- var x=xmlDoc.getElementsByTagName("searchtimer");
- maxTimers = x.length;
- searchtimers.length = 0; // clear timers[i] tries to clear crap if current x.length < previous x.length
- if (x.length > 0) {
- for (var i=0;i<x.length;i++)
- {
- var fill = "\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003";
- searchtimersID[i] = x[i].getElementsByTagName("id")[0].childNodes[0].nodeValue;
- searchtimersSearch[i] = x[i].getElementsByTagName("search")[0].childNodes[0].nodeValue;
- searchtimersFlag[i] = x[i].getElementsByTagName("use_as_searchtimer")[0].childNodes[0].nodeValue;
- if (searchtimersFlag[i] == "1") {
- searchtimers[i] = "\uE003\uE017\uE003";
- } else if (searchtimersFlag[i] == "0") {
- searchtimers[i] = "\uE003\uE016\uE003";
- } else {
- searchtimers[i] = "\uE003?\uE003";
- }
-
- // Extended INFO
- SearchTimer[i] = "<center><pre style='" + color_main_head + ";'>" + x[i].getElementsByTagName("search")[0].childNodes[0].nodeValue + "\n </pre></center><pre>";
- if ((x[i].getElementsByTagName("use_as_searchtimer")[0].childNodes[0].nodeValue) == 0) {
- SearchTimer[i] += "\uE003\uE016\uE003" + Lang[40] + "\n";
- } else {
- SearchTimer[i] += "\uE003\uE017\uE003" + Lang[40] + "\n";
- }
- SearchTimer[i] = SearchTimer[i] + "\uE003\uE003\uE003Mode :\uE003" + (searchmode[x[i].getElementsByTagName("mode")[0].childNodes[0].nodeValue]) + "\n";
- if ((x[i].getElementsByTagName("use_time")[0].childNodes[0].nodeValue) == 1) {
- SearchTimer[i] += "\uE003\uE017\uE003" + Lang[41] + "\uE003" +
- x[i].getElementsByTagName("start_time")[0].childNodes[0].nodeValue +
- "\uE003-\uE003" + x[i].getElementsByTagName("stop_time")[0].childNodes[0].nodeValue + "\n";
- } else {
- SearchTimer[i] += "\uE003\uE016\uE003" + Lang[41] + "\uE003" + "\n";
- }
- if ((x[i].getElementsByTagName("use_dayofweek")[0].childNodes[0].nodeValue) == 0) {
- SearchTimer[i] += "\uE003\uE016\uE003" + Lang[47] + "\uE003" + "\n";
- } else {
- //bit is used for dayofweek.
- var dowx = x[i].getElementsByTagName("dayofweek")[0].childNodes[0].nodeValue;
- var dow = "";
- if (dowx > 0) { var y = 1;} else { var y = 0;}
- dowx = Math.abs(dowx);
- for (var dowi=0; dowi<7; dowi++)
- {
- var mask = 1 << dowi;
- if ((dowx & mask) != 0) { dow += days[(dowi+y)] + "\uE003";}
- }
- SearchTimer[i] += "\uE003\uE017\uE003" + Lang[47] + "\uE003:\uE003" + dow + "\n";
- }
-
-
- if ((x[i].getElementsByTagName("use_channel")[0].childNodes[0].nodeValue) == 0) {
- SearchTimer[i] += "\uE003\uE016\uE003" + Lang[42] + "\uE003" + "\n";
- } else {
- SearchTimer[i] += "\uE003\uE017\uE003" + Lang[42] + "\uE003:\uE003" +
- searchchan[(x[i].getElementsByTagName("use_channel")[0].childNodes[0].nodeValue)] + "\uE003" +
- x[i].getElementsByTagName("channels")[0].childNodes[0].nodeValue + "\n";
- }
-
- SearchTimer[i] += "\n</pre>";
- // End of Extended INFO
-
-
- searchtimers[i] += searchtimersSearch[i] + "\uE003\uE003\n" ;
- }
- timerOK = 1;
- }
- } catch(e) {
- timerOK = 0;
- alert("Get SearchTimers problem: " + e);
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[8] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'><center>\n " + Lang[43] + ": \n " + server_ip + RestFulAPI + "</center></pre>";
- }
-}
-
-function ShowSearchTimerInfo() {
- // info about a search timer.
- //Like Show EPG Info
- //setup some dummy vars
-
- var info1 = ""; var info2 = "";
-
- try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + RestFulAPI + "/searchtimers/search/" + searchtimersID[timerID] + ".xml?" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- var x=xmlDoc.getElementsByTagName("event");
- var maxinfo = x.length; if (maxinfo > 15) { maxinfo = 15;}
-
- for (var i=0;i<maxinfo;i++)
- {
- info2 = x[i].getElementsByTagName("param")[16].childNodes[0].nodeValue; // Timer exists
- if (info2 == "true") {
- info1 += "\uE003\uE00C\uE003";
- } else {
- info1 += "\uE003\uE003\uE003";
- }
- info2 = x[i].getElementsByTagName("param")[17].childNodes[0].nodeValue; // Timer active
- if (info2 == "true") {
- info1 += "\uE017\uE003";
- } else {
- info1 += "\uE016\uE003";
- }
-
- info2 = x[i].getElementsByTagName("param")[6].childNodes[0].nodeValue; // Time
- date = new Date(Number(info2)*1000);
- month = date.getMonth();
- d = date.getDate();
- day = date.getDay();
- h = date.getHours();
- m = date.getMinutes();
- h=addzero(h);
- m=addzero(m);
- info2 = Left(days[day],3) + "\uE003" + d + "\uE003" + Left(months[month],3) + "\uE003" + h + ':' + m;
- info1 += info2;
- info2 = "\uE003\uE003" + x[i].getElementsByTagName("param")[7].childNodes[0].nodeValue/60 + "\uE003"; // Duration
- info1 += "\uE003" + Right(info2,3) + Lang[56] + "\uE003" + x[i].getElementsByTagName("param")[5].childNodes[0].nodeValue + "\uE003"; // Channel
- info1 += "\uE003" + Left(x[i].getElementsByTagName("param")[1].childNodes[0].nodeValue,25) + "\uE003"; // Programm Title
- info1 += "\n";
-
- }
-
- } catch(e) {
- alert("Get SearchTimer INFO problem: " + e);
-
- }
-
- osdepginfo.innerHTML = "<center><pre style='" + color_main_head + ";'>" + searchtimersSearch[timerID] + "\n </pre></center><pre>" + info1 + "</pre>" ;
-
-}
-
-// End of Menu section
-
-// MPD Section
-
-function MPD(ev) {
-// alert("Media player state changed: " + ev);
-// alert("Media player state changed: state=" + ev.state + ", reason=" + ev.reason + ", code=" + ev.code);
-// alert("Media player error :" + mediaPlayer.getError().details);
-if (MPDListener == 0) {
- if (ev.state == 6 ) {
- if (ev.reason == "CommandClose" && ErrorAgain == 0) {
- setTimeout("mediaPlayer.open(URL);mediaPlayer.play(1000);GetEPG(currChan);ExtraStuff();",500);
- ErrorAgain = 1;
- } else {
- ErrorAgain = 0;
- alert("Media player state changed: state=" + ev.state + ", reason=" + ev.reason + ", code=" + ev.code);
- showDisplay("ERRR", false, 100, 0 );
- if (experimental) {
- settimer(0,ev.reason,0,2,ErrorColor);
- } else {
- settimer(0,Lang[67],0,2,ErrorColor);
- }
- }
- }
-
-} else {
- if ( ev.state == 6 && ev.reason == "HostUnreachable" ) {
- showDisplay("ERRR", false, 100, 0 );
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[60] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>" + Lang[34] + "\n 0 -" + Lang[9] + "\n 9 -" + Lang[61] + "\n\n<center style='" + color_main_head + ";'>" + Lang[62] + ": \n" + server_ip + MPDAddress + "</center></pre>";
- } else if ( ev.state == 2 ) { // && ev.reason == "PositionEnd" ) {
- showDisplay("STOP", false, 100, 0 );
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[60] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>" + Lang[34] + "\n 0 -" + Lang[9] + "\n 9 -" + Lang[63] + "\n\n<center style='" + color_main_head + ";'>" + Lang[64] + ": \n" + server_ip + MPDAddress + "\n" + Lang[65] + "</center></pre>";
- } else if ( ev.state == 3 && ev.reason == "CommandPlay" ) {
- showDisplay("MPD", false, 100, 0 );
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[60] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>" + Lang[34] + "\n 0 -" + Lang[9] + "\n\n\n<center style='" + color_main_head + ";'>" + Lang[64] + ": \n" + server_ip + MPDAddress + "</center></pre>";
- } else {
- showDisplay("ERRR", false, 100, 0 );
- mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[60] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>" + Lang[34] + "\n 0 -" + Lang[9] + "\n 9 -" + Lang[63] + "\n\n<center style='" + color_main_head + ";'>Error : " + ev.state + "\n" + Lang[66] + ": " + ev.reason + "</center></pre>";
- }
-}
-
-}
-
-function playMPD(uri) {
- try {
- if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
- mediaPlayer.close();
- }
- MPDListener = 1;
- mediaPlayer.open(uri);
- mediaPlayer.play(1000);
- } catch (e) {
- alert("Failed opening recording: " + e);
- return;
- }
-}
-
-
-// End of MPD Section
-
-// Media Player Section
-
-function LoadMediaSettings() {
- subgroup = 0;
- subsubgroup = 0;
- isMediaMenu = 1;
- isFullscreen = 0;
- if (getRecOK !== 2) { showDisplay("STOP", false, 100, 0 ); }
- currMed = 0;
- if (getRecOK) { showMediaList();}
- mediaPlayer.addEventListener(mediaPlayer.ON_POSITION_CHANGED, ShowMediaOSD);
- mediaPlayer.addEventListener(mediaPlayer.ON_STATE_CHANGED, onStateChanged);
-}
-
-function UnloadMediaSettings() {
- mediaPlayer.removeEventListener(mediaPlayer.ON_POSITION_CHANGED, ShowMediaOSD);
- mediaPlayer.removeEventListener(mediaPlayer.ON_STATE_CHANGED, onStateChanged);
- medialist.style.opacity = 0;
- osdmedia.style.opacity = 0;
- osdtime.style.opacity = 0;
- osdepginfo.style.opacity = 0;
- medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[0] + "</center></h1>";
- showDisplay(Right(currChan.toString(),4), false, 100, 0 );
- isMediaMenu = 0;
- isFullscreen = 1;
- isPause = 0;
- set_yellow_key = 0;
- localRecording = 0;
- if (mediaPlayer.getState() != mediaPlayer.STATE_PLAYING ) {
- play(channels[currChan]);
- }
-}
-
-
-
-function onKeyMedia(keyCode) {
-if (DelisOK) {
- switch(keyCode) {
- case KEY_OK:
- medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[0] + "</center></h1>";
- switchtimer.style.opacity = 0;
- setTimeout("DelRec2(); getRecList(); showMediaList();",100)
- default:
- switchtimer.style.opacity = 0;
- DelisOK = 0;
- break;
- } // end of switch
-} else if (medialist.style.opacity != 0) {
- switch(keyCode) {
- case "BrowserBack":
- if (subgroup && osdepginfo.style.opacity == 0) {
- subgroup = 0;
- subsubgroup = 0;
- if (ShowSubDir) {
- MakeRecList2();
- } else {
- MakeRecList();
- }
- setTimeout("showMediaList();",100)
- break;
- }
- if (osdepginfo.style.opacity == 1) { osdepginfo.style.opacity = 0; break; }
- case "TV":
- UnloadMediaSettings();
- break;
- case "Yellow":
- if (set_yellow_key) {
- //hide/display schedule with same button
- UnloadMediaSettings();
- }
- break;
- case "Right":
- if (getRecOK !== 0) {
- for (var i=0;i<10;i++) {
- do
- {
- incMed(1);
- }
- // while (!recTitl[currMed]);
- while (!recList[currMed]);
- }
- showMediaList();
- }
- break;
- case "Left":
- if (getRecOK !== 0) {
- for (var i=0;i<10;i++) {
- do
- {
- decMed(1);
- }
- // while (!recTitl[currMed]);
- while (!recList[currMed]);
- }
- showMediaList();
- }
- break;
- case "Down":
- if (getRecOK !== 0) {
- do
- {
- incMed(1);
- }
- // while (!recTitl[currMed]);
- while (!recList[currMed]);
- showMediaList();
- }
- break;
- case "Up":
- if (getRecOK !== 0) {
- do
- {
- decMed(1);
- }
- // while (!recTitl[currMed]);
- while (!recList[currMed]);
- showMediaList();
- }
- break;
- case KEY_OK:
- case "MediaPlayPause":
- if (getRecOK == 2) {
- ShowInfo();
- osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
- }
- if (getRecOK == 1) {
- if (recGroup[currMed] !== 0 && subgroup == 0 && ShowSubDir) {
- if (subgroup_old) {
- setTimeout("MakeRecList_sublevel(recGroup[currMed]); showMediaList();",100)
- } else {
- setTimeout("MakeRecList3(recGroup[currMed]); showMediaList();",100)
- }
- subgroup = 1;
- } else if (recSubGroup[currMed] !== 0 && subgroup == 1 && subsubgroup == 0 && ShowSubDir && subgroup_old) {
- setTimeout("MakeRecList_sublevel2(recGroup[currMed],recSubGroup[currMed]); showMediaList();",100)
- subsubgroup = 1;
- } else {
- recList[currMed] = "\u0003" + recList[currMed].substring(1);
- medialist.style.opacity = 0;
- if (get_recordings == 1) {
- setTimeout("GetMarks(); getResume(); playRec(recLink[currMed]+ '?mode=streamtoend&time=' + position);",100);
- } else if (get_recordings == 2) {
-// setTimeout("playRec(recLink[currMed]+ '?pos=resume');position = (mediaPlayer.getPosition()/1000);",100)
- position = 0;
- setTimeout("playRec(recLink[currMed]);",100)
- }
- }
- }
- break;
- case "Red":
- if (getRecOK == 1 && (recGroup[currMed] == 0 || subgroup == 1)) {
- // Only delete item if it isn't a subdir marker
- DelRec();
- }
- if (getRecOK == 2) { //set timer
- settimer(recStrt[currMed],recTitl[currMed],recDura[currMed],1,color_switchtimer,recDesc[currMed],recGUID[currMed].toString());
- }
- break;
- case "Blue":
- // only show info if not a subdir marker or if in EPG mode
- if ( (getRecOK == 1 && (recGroup[currMed] == 0 || subgroup == 1)) || getRecOK == 2) {
- ShowInfo();
- osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
- }
- break;
- case "Green":
- if (getRecOK == 2 && mediaRecorder) { //set timer only if mediaRecorder = 1, unit has harddisk
- settimer(recStrt[currMed],recTitl[currMed],recDura[currMed],3,"",recDesc[currMed],recGUID[currMed].toString());
- }
- break;
-
- case "VolumeMute":
- VolumeMute();
- break;
- case "VolumeUp":
- VolumeUp();
- break;
- case "VolumeDown":
- VolumeDown();
- break;
-
- case KEY_REC:
- case KEY_REC2:
- // make timer for recording
- if (getRecOK == 2) { //set timer
- settimer(recStrt[currMed],recTitl[currMed],recDura[currMed],2);
- ServerTimer(channels[currChan],recGUID[currMed]);
- }
- break;
- case KEY_0:
- if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
- // Only rewind file if it isn't a subdir marker
- setResumeNull();
- showMediaList();
- }
- break;
- case KEY_1:
- if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
- // Only do reccmds if it isn't a subdir marker
- reccmds(1);
- }
- break;
- case KEY_2:
- if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
- // Only do reccmds if it isn't a subdir marker
- reccmds(2);
- }
- break;
- case KEY_3:
- if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
- // Only do reccmds if it isn't a subdir marker
- reccmds(3);
- }
- break;
- case KEY_4:
- if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
- // Only do reccmds if it isn't a subdir marker
- reccmds(4);
- }
- break;
- case KEY_5:
- if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
- // Only do reccmds if it isn't a subdir marker
- reccmds(5);
- }
- break;
- case KEY_6:
- if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
- // Only do reccmds if it isn't a subdir marker
- reccmds(6);
- }
- break;
- case KEY_7:
- if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
- // Only do reccmds if it isn't a subdir marker
- reccmds(7);
- }
- break;
- case KEY_8:
- if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
- // Only do reccmds if it isn't a subdir marker
- reccmds(8);
- }
- break;
- case KEY_9:
- if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
- // Only do reccmds if it isn't a subdir marker
- reccmds(9);
- }
- break;
-
-
-
- default:
- break;
- } // end of switch
-} else {
- switch(keyCode) {
- case "BrowserBack":
-// ShowInfo();
-// osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
- break;
- case "TV":
- setResume();
- play(channels[currChan]);
- UnloadMediaSettings();
- break;
- break;
- case "Down":
- if (mediaPlayer.getState() != mediaPlayer.STATE_PAUSED) {
- showDisplay("PAUS", false, 100, 0 );
- mediaPlayer.play(0);
- }
- break;
- case "Up":
- if (mediaPlayer.getState() != mediaPlayer.STATE_PLAYING) {
- if (currMed == -1 || localRecording == 1 ) {
- showDisplay("PLAY", false, 100, 0 );
- mediaPlayer.play(1000);
- } else {
- position += (mediaPlayer.getPosition()/1000);
- if (get_recordings == 1) {
- playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
- } else if (get_recordings == 2) {
- playRec((recLink[currMed] + "?pos=time." + position));
- }
- }
- }
- break;
- case KEY_OK:
- osdmedia.style.opacity = 1 - osdmedia.style.opacity;
- osdtime.style.opacity = osdmedia.style.opacity;
- ShowMediaOSD();
- break;
- case "Green":
- if (audio_dyn < (lang_prio_dyn.length -1)) { audio_dyn += 1} else { audio_dyn = 0 }
- if (lang_prio_dyn.length > 1) {
- is.setObject("cfg.media.audio.languagepriority",lang_prio_dyn[audio_dyn] + "," + lang_prio[audio],is.STORAGE_PERMANENT);
- osdlang.style.opacity = 1;
- osdlang.innerHTML = "<img src='unmute.png'> " + lang_prio_dyn[audio_dyn] + " ";
- setTimeout("osdlang.style.opacity = 0; ", 3000);
- }
- break;
- case "Yellow":
- ShowSubs = 1 - ShowSubs;
- videoplane.subtitles = Boolean(ShowSubs); // Enable subtitles or Disable subtitles
- break;
- case "Blue":
- if ( isPause == 0 ) {
- ShowInfo();
- osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
- }
- break;
- case "Red":
- GetMarks();
- ShowMediaOSD();
- break;
-
- case "Menu":
- osdepginfo.style.opacity = 0;
- osdepginfonext.style.opacity = 0;
- isSetupMenu = 1;
- mainmenu.style.opacity = 0.8;
- menu = 6;
- InitMenu(menu);
- break;
-
- case "VolumeMute":
- VolumeMute();
- break;
- case "VolumeUp":
- VolumeUp()
- break;
- case "VolumeDown":
- VolumeDown();
- break;
-
-
- case KEY_REC:
- case KEY_REC2:
- break;
- case "MediaRewind":
- if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
- mediaPlayer.play(-4000);
- showDisplay("REW", false, 100, 0 );
- }
- break;
- case "MediaForward":
- if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
- mediaPlayer.play(4000);
- showDisplay("FF", false, 100, 0 );
- }
- break;
- case "MediaStop":
- if (currMed == -1 || isPause == 1 || localRecording == 1) {
- if (localRecording == 1) {
- ss.setParameter(recDummy[0], "resume", mediaPlayer.getPosition().toString());
- }
- osdepginfo.style.opacity = 0;
- isFullscreen = 1; play(channels[currChan]);
- UnloadMediaSettings();
- } else {
- setResume();
- osdepginfo.style.opacity = 0;
- isFullscreen = 0; play(channels[currChan]); isFullscreen = 1;
- medialist.style.opacity = 0.9;
- showDisplay("STOP", false, 100, 0 );
- showMediaList();
- }
- break;
- case "MediaPlayPause":
- if (mediaPlayer.getState() != mediaPlayer.STATE_PAUSED) {
- showDisplay("PAUS", false, 100, 0 );
- mediaPlayer.play(0);
- } else {
- if (currMed == -1 || localRecording == 1) {
- showDisplay("PLAY", false, 100, 0 );
- mediaPlayer.play(1000);
- } else {
- position += (mediaPlayer.getPosition()/1000);
- if (get_recordings == 1) {
- playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
- } else if (get_recordings == 2) {
- playRec((recLink[currMed] + "?pos=time." + position));
- }
- }
- }
- break;
- case KEY_1:
- if (localRecording != 1 ) {
- position += (mediaPlayer.getPosition()/1000) - 30;
- if (position <= 0) { position = 0;}
- if (get_recordings == 1) {
- playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
- } else if (get_recordings == 2) {
- playRec((recLink[currMed] + "?pos=time." + position));
- }
- } else {
- mediaPlayer.playFromPosition((mediaPlayer.getPosition()-30000),1000);
- }
- break;
- case KEY_4:
- if (localRecording != 1 ) {
- position += (mediaPlayer.getPosition()/1000) - 60;
- if (position <= 0) { position = 0;}
- if (get_recordings == 1) {
- playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
- } else if (get_recordings == 2) {
- playRec((recLink[currMed] + "?pos=time." + position));
- }
- } else {
- mediaPlayer.playFromPosition((mediaPlayer.getPosition()-60000),1000);
-
- }
- break;
- case KEY_7:
- if (localRecording != 1 ) {
- position += (mediaPlayer.getPosition()/1000) - 240;
- if (position <= 0) { position = 0;}
- if (get_recordings == 1) {
- playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
- } else if (get_recordings == 2) {
- playRec((recLink[currMed] + "?pos=time." + position));
- }
- } else {
- mediaPlayer.playFromPosition((mediaPlayer.getPosition()-240000),1000);
-
- }
- break;
-
- case KEY_5:
- if (localRecording != 1 ) {
- if (recMark.length>posMark && get_recordings == 1) {
- position = recMark[posMark];
- playRec(recLink[currMed] + "?mode=streamtoend&time=" + position);
- }
- }
- break;
- case KEY_2:
- if (localRecording != 1 ) {
- if (posMark>0 && get_recordings == 1) {
- posMark -= 1;
- position = recMark[posMark];
- playRec(recLink[currMed] + "?mode=streamtoend&time=" + position);
- }
- }
- break;
- case KEY_8:
- if (localRecording != 1 ) {
- if (recMark[posMark+1] && get_recordings == 1) {
- posMark += 1;
- position = recMark[posMark];
- playRec(recLink[currMed] + "?mode=streamtoend&time=" + position);
- }
- }
- break;
-
-
-
- case KEY_3:
- if (localRecording != 1 ) {
- position += (mediaPlayer.getPosition()/1000) + 30;
- if (get_recordings == 1) {
- if (position >= recDura[currMed]) {
- BackToTV();
- } else {
- playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
- }
- } else if (get_recordings == 2) {
- playRec((recLink[currMed] + "?pos=time." + position));
- }
- } else {
- mediaPlayer.playFromPosition((mediaPlayer.getPosition()+30000),1000);
- }
- break;
- case KEY_6:
- if (localRecording != 1 ) {
- position += (mediaPlayer.getPosition()/1000) + 60;
- if (get_recordings == 1) {
- if (position >= recDura[currMed]) {
- BackToTV();
- } else {
- playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
- }
- } else if (get_recordings == 2) {
- playRec((recLink[currMed] + "?pos=time." + position));
- }
- } else {
- mediaPlayer.playFromPosition((mediaPlayer.getPosition()+60000),1000);
- }
- break;
- case KEY_9:
- if (localRecording != 1 ) {
- position += (mediaPlayer.getPosition()/1000) + 240;
- if (get_recordings == 1) {
- if (position >= recDura[currMed]) {
- BackToTV();
- } else {
- playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
- }
- } else if (get_recordings == 2) {
- playRec((recLink[currMed] + "?pos=time." + position));
- }
- } else {
- mediaPlayer.playFromPosition((mediaPlayer.getPosition()+240000),1000);
- }
- break;
- case KEY_0:
- if (localRecording != 1 ) {
- position = 0; posMark = 0;
- if (get_recordings == 1) {
- playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
- } else if (get_recordings == 2) {
- playRec((recLink[currMed] + "?pos=time." + position));
- }
- } else {
- mediaPlayer.playFromPosition(0,1000)
- }
- break;
-
- default:
- break;
- } // end of switch
- } // end of if
-}
-
-function getRecList() {
- getVDRstatus();
- MaxInGroup = 14;
- subgroup = 0;
- subsubgroup = 0;
-try {
- if (get_recordings ==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 (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);
- 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 i=0;i<x.length;i++) {
- recTitl[i] = rec_lst[i][0];
- recLink[i] = rec_lst[i][1];
- recDesc[i] = rec_lst[i][2];
- recDura[i] = rec_lst[i][3];
- recStrt[i] = rec_lst[i][4];
- rec_New[i] = rec_lst[i][5];
- recGUID[i] = rec_lst[i][6];
- 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);
- //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 if (get_recordings == 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;
-
- 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.split(" ");
- rec_lst[i][0] = rec_lst[i][0][1].split("~");
- rec_lst[i][1] = x[i].getElementsByTagName("enclosure")[0].getAttribute('url');
- rec_lst[i][2] = Lang[37];
- rec_lst[i][3] = Lang[37];
- rec_lst[i][4] = x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue;
- rec_lst[i][4] = rec_lst[i][4].split(" ");
- rec_lst[i][4] = rec_lst[i][4][1] + " " + rec_lst[i][4][2];
- rec_lst[i][5] = Lang[37];
- rec_lst[i][6] = x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue;
- rec_lst[i][7] = 0;
- rec_lst[i][8] = 0;
- }
-
- rec_lst.sort();
- for (var i=0;i<x.length;i++) {
- recTitl[i] = rec_lst[i][0];
- recLink[i] = rec_lst[i][1];
- recDesc[i] = rec_lst[i][2];
- recDura[i] = rec_lst[i][3];
- recStrt[i] = rec_lst[i][4];
- rec_New[i] = rec_lst[i][5];
- recGUID[i] = rec_lst[i][6];
- recChan[i] = rec_lst[i][7];
- recProt[i] = rec_lst[i][8];
- }
-
-
- recProt[i] = 1;
-} else if (get_recordings == 0) {
- // get recordings from restfulapi
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + RestFulAPI + "/recordings.xml?" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- var x=xmlDoc.getElementsByTagName("recording");
- nrMedia = x.length - 1;
- recTitl.length = 0;
- rec_lst.length = 0;
-
- 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("param")[1].childNodes[0].nodeValue;
- rec_lst[i][0] = rec_lst[i][0].split("~");
- rec_lst[i][1] = x[i].getElementsByTagName("param")[2].childNodes[0].nodeValue;
- rec_lst[i][2] = x[i].getElementsByTagName("param")[13].textContent;
- rec_lst[i][3] = x[i].getElementsByTagName("param")[8].childNodes[0].nodeValue;
- rec_lst[i][4] = x[i].getElementsByTagName("param")[14].childNodes[0].nodeValue;
- rec_lst[i][5] = x[i].getElementsByTagName("param")[4].childNodes[0].nodeValue;
- rec_lst[i][6] = x[i].getElementsByTagName("param")[0].childNodes[0].nodeValue;
- //Get channel number from recordings, shows right names only if server & client use same channel order
- recDummy = rec_lst[i][1].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 i=0;i<x.length;i++) {
- recTitl[i] = rec_lst[i][0];
- recLink[i] = rec_lst[i][1];
- recDesc[i] = rec_lst[i][2];
- recDura[i] = rec_lst[i][3];
- recStrt[i] = rec_lst[i][4];
- rec_New[i] = rec_lst[i][5];
- recGUID[i] = rec_lst[i][6];
- recChan[i] = rec_lst[i][7];
- recProt[i] = rec_lst[i][8];
- }
- recProt[i] = 1;
- // try to fix display double entries in the last directory. (Only shown for some time after deleting files, should be fixed now)
-}
-
-
-//end of get_recordings
- if (ShowSubDir) {
- MakeRecList2();
- } else {
- MakeRecList();
- }
- if (i!==0) { getRecOK = 1; } else {
- getRecOK = 0;
- medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[38] + "</center><pre>\n\n\n" + Lang[37] + "</pre></h1>";
- }
-
- } catch(e) {
- alert("Get Recordings problem: " + e);
- getRecOK = 0;
- medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[38] + "</center><pre>\n\n\n" + Lang[39] + "</pre></h1>";
- }
-}
-
-
-function GetMarks() {
-
-if (get_marks==1) {
- try {
- posMark = 0;
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + recServ + "/getMarks.xml?guid=" + recGUID[currMed] + "&" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- recMark = [];
- var x=xmlDoc.getElementsByTagName("mark");
- for (var i=0;i<x.length;i++)
- {
- var y = x[i].childNodes[0].nodeValue.split(",");
- recMark[i] = Number(y[0]);
- }
- } catch(e) {
- alert("Getting Marks problem: " + e);
- }
- } else {
- try {
- posMark = 0;
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + RestFulAPI + "/recordings/" + currMed + ".xml?marks=true&" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- recMark = [];
- var x=xmlDoc.getElementsByTagName("mark");
- for (var i=0;i<x.length;i++)
- {
- var y = x[i].childNodes[0].nodeValue.split(":");
- recMark[i] = Number(y[0]*3600) + Number(y[1]*60) + Number(y[2]);
- }
- } catch(e) {
- alert("Getting Marks problem: " + e);
- }
- }
-}
-
-
-function setResume() {
-if (get_recordings == 1) {
-try {
- position += (mediaPlayer.getPosition()/1000)
- var xmlhttp = new XMLHttpRequest();
- xmlhttp.open("POST", server_ip + recServ + "/setResume.xml?guid=" + recGUID[currMed] + "&resume=" + position, false);
- xmlhttp.send();
- recList[currMed] = "\uE003" + recList[currMed].substring(1);
- } catch(e) {
- alert("Setting Resume problem: " + e);
- }
-}
-}
-
-function getResume() {
-position = 0;
-if (get_recordings == 1) {
-try {
- var xmlhttp = new XMLHttpRequest();
- var i = 0;
- xmlhttp.open("GET", server_ip + recServ + "/getResume.xml?guid=" + recGUID[currMed] + "&" + new Date().getTime(), false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- i = xmlDoc.getElementsByTagName("resume")[0].childNodes[0].nodeValue.split(",");
- position = Number(i[0]);
- } catch(e) {
- alert("Getting Resume problem: " + e);
- }
-}
-}
-
-
-function setResumeNull() {
-if (get_recordings == 1) {
-try {
- var xmlhttp = new XMLHttpRequest();
- xmlhttp.open("POST", server_ip + recServ + "/setResume.xml?guid=" + recGUID[currMed] + "&resume=0", false);
- xmlhttp.send();
- recList[currMed] = "\uE010" + recList[currMed].substring(1);
- } catch(e) {
- alert("Setting Resume problem: " + e);
- }
-}
-}
-
-function reccmds(option) {
-try {
- option = Number(option);
- if (RecCmds[option] > -1 ) {
- var xmlhttp = new XMLHttpRequest();
- xmlhttp.open("POST", server_ip + recServ + "/execreccmd?cmd=" + RecCmds[option] + "&guid=\"" + recGUID[currMed] + "\"", false);
- xmlhttp.send();
- recList[currMed] = RecCmdsIcon[option] + recList[currMed].substring(1);
- showMediaList();
- }
- } catch(e) {
- alert("Execute reccmds problem: " + e);
- }
-
-}
-
-
-
-function CheckPlugins() {
-try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + recServ + "/vdrstatus.xml?" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- smartTVplugin = 1;
- } catch(e) {
- alert("NO smartTVplugin: " + e);
- smartTVplugin = 0;
- }
-
-//Check for Restfulapi
-
-try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + RestFulAPI + "/info.xml?" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- Restfulapiplugin = 1;
- } catch(e) {
- alert("NO Restfulapiplugin: " + e);
- Restfulapiplugin = 0;
- }
-}
-
-function getVDRstatus() {
-if (smartTVplugin == 1) {
-try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + recServ + "/vdrstatus.xml?" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
-// var x=xmlDoc.getElementsByTagName("vdrstatus");
- var x=xmlDoc.getElementsByTagName("diskspace");
- free_space = x[0].getElementsByTagName("free")[0].childNodes[0].nodeValue;
- perc_space = x[0].getElementsByTagName("percent")[0].childNodes[0].nodeValue;
- } catch(e) {
- alert("Get VDR Status problem: " + e);
- }
-}
-if (smartTVplugin == 0 && Restfulapiplugin == 1) {
-try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + RestFulAPI + "/info.xml?" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- var x=xmlDoc.getElementsByTagName("diskusage");
- free_space = x[0].getElementsByTagName("free_mb")[0].childNodes[0].nodeValue;
- perc_space = x[0].getElementsByTagName("used_percent")[0].childNodes[0].nodeValue;
- } catch(e) {
- alert("Get VDR Status problem: " + e);
- }
- }
-}
-
-
-function DelRec() {
- if (osdepginfo.style.opacity == 1) {osdepginfo.style.opacity = 0;}
-try {
- //popup for confirm
- switchtimer.style.background = "red";
- switchtimer.style.opacity = 1;
- switchtimer.innerHTML = "<pre><center>" + Lang[44] +"\n" + Lang[45] + "\n\n " + Left(recTitl[currMed],30) + "</center></pre>"; // Recording Name
- DelisOK = 1
- } catch(e) {
- alert("Delete Recordings problem: " + e);
- }
-}
-
-function DelRec2() {
- if (get_recordings == 1) {
- try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("POST",(server_ip + recServ + "/deleteRecording.xml?id=" + recGUID[currMed] ),false);
- xmlhttp.send();
- recList[currMed] = "";
- recGroup[currMed] = -1;
- recProt[currMed] = 0;
- } catch(e) {
- alert("Delete Recordings problem: " + e);
- }
- } else if (get_recordings == 0) {
-// try {
-// xmlhttp=new XMLHttpRequest();
-// xmlhttp.open("DELETE",(server_ip + RestFulAPI + "/recordings/" + recGUID[currMed] ),true);
-// xmlhttp.send();
-// recList[currMed] = "";
-// recGroup[currMed] = -1;
-// recProt[currMed] = 0;
-// } catch(e) {
-// alert("Delete Recordings problem: " + e);
-// }
-//
- }
-}
-
-
-
-
-function MakeRecList() {
-//old style list
- var x = "";
- var xx = "";
- for (var i=0;i<recTitl.length;i++)
- {
- if (recTitl[i][recMap + 2]) {
- if (recTitl[i][recMap + 1] != xx) {
- var y = recTitl[i][recMap].length + 1;
- if (recTitl[i][recMap] != x) {
- recList[i] = "\uE002 " + recTitl[i][recMap] + " \uE002 " + String(recTitl[i]).substring(y);
- } else {
- recList[i] = "\uE003 " + new Array(y).join("\uE003") + " \uE002 " + String(recTitl[i]).substring(y);
- }
- } else {
- var y = recTitl[i][recMap + 1].length + recTitl[i][recMap].length + 4;
- recList[i] = new Array(y).join("\uE003") + String(recTitl[i]).substring(y - 2);
- }
- } else if (recTitl[i][recMap + 1]) {
- if (recTitl[i][recMap] != x) {
- recList[i] = "\uE002" + recTitl[i];
- } else {
- var y = recTitl[i][recMap].length + 4;
- recList[i] = new Array(y).join("\uE003") + String(recTitl[i]).substring(y - 3);
- }
- } else {
- recList[i] = "\uE003" + recTitl[i];
- }
- if (get_recordings == 2 ) {
- result = recStrt[i];
- } else{
- AddInfo(i);
- }
-
- if (rec_New[i] == "true" )
- {
- recList[i] = "\uE010" + result + "\uE003" + recList[i];
- } else {
- recList[i] = "\uE003" + result + "\uE003" + recList[i];
- }
- x = recTitl[i][recMap];
- xx = recTitl[i][recMap + 1];
- if ((recProt[i] == 1) && (ShowProtectedChannels == 1)) { recList[i] = "";}
- }
-}
-
-function MakeRecList2() {
-//new style with sub maps
- var x = "";
- var xx = 0;
- for (var i=0;i<recTitl.length;i++)
- {
- if (recTitl[i][1]) {
- if (recTitl[i][0] != x) {
- recList[i] = "\uE002\uE003" + recTitl[i][0];
- xx += 1;
- } else {
- recList[i] = "" ;
- }
- recGroup[i] = xx;
- } else {
- recGroup[i] = 0;
- if (get_recordings == 2 ) {
- result = recStrt[i];
- } else{
- AddInfo(i);
- if (recChan[i] !== "Media File") {result += "\uE003" + (recDura[i]/60).toFixed(0);}
- }
- if (rec_New[i] == "true" ) {
- recList[i] = "\uE010" + result + "\uE003" + recTitl[i];
- } else {
- recList[i] = "\uE003" + result + "\uE003" + recTitl[i];
- }
- }
-
- if ((recProt[i] == 1) && (ShowProtectedChannels == 1)) { recList[i] = "";}
-
- x = recTitl[i][0];
- }
-}
-
-function MakeRecList3(GroupID) {
-
- MaxInGroup = -1;
- for (var i=0;i<recTitl.length;i++)
- {
- if (recGroup[i] == GroupID) {
- var tmp = "";
- for (var ii=1;ii<recTitl[i].length;ii++)
- {
- tmp += "\uE003" + recTitl[i][ii];
- }
- if (get_recordings == 2 ) {
- result = recStrt[i];
- } else{
- AddInfo(i);
- if (recChan[i] !== "Media File") {result += "\uE003" + (recDura[i]/60).toFixed(0);}
- }
- if (rec_New[i] == "true" ) {
- recList[i] = "\uE010" + result + tmp; // recTitl[i];
- } else {
- recList[i] = "\uE003" + result + tmp; //recTitl[i];
- }
-
- MaxInGroup = MaxInGroup + 1;
- if ((recProt[i] == 1) && (ShowProtectedChannels == 1)) { recList[i] = "";}
-
- } else {
- recList[i] = "" ;
- }
- }
-}
-
-//
-//
-// sub-sublevel testing
-//
-//
-
-function MakeRecList_sublevel(GroupID) {
-//new style with sub maps on sub maps
- var x = "";
- var xx = 0;
- recList.length = 0;
- MaxInGroup = -1;
- for (var i=0;i<recTitl.length;i++)
- {
- if (recGroup[i] == GroupID) {
- Group_Header[GroupID] = recTitl[i][0];
- if (recTitl[i][2]) {
- if (recTitl[i][1] != x) {
-
- recList[i] = "\uE002\uE003" + recTitl[i][1];
- xx += 1;
- } else {
- recList[i] = "" ;
- }
- recSubGroup[i] = xx;
- } else {
- recSubGroup[i] = 0;
- var tmp = "";
- for (var ii=1;ii<recTitl[i].length;ii++)
- {
- tmp += "\uE003" + recTitl[i][ii];
- }
- if (get_recordings == 2 ) {
- result = recStrt[i];
- } else{
- AddInfo(i);
- if (recChan[i] !== "Media File") {result += "\uE003" + (recDura[i]/60).toFixed(0);}
- }
- if (rec_New[i] == "true" ) {
- recList[i] = "\uE010" + result + tmp; // recTitl[i];
- } else {
- recList[i] = "\uE003" + result + tmp; //recTitl[i];
- }
- }
- if ((recProt[i] == 1) && (ShowProtectedChannels == 1)) { recList[i] = "";}
- if (recList[i] != "") { MaxInGroup = MaxInGroup + 1; }
- x = recTitl[i][1];
- }
- }
-//MakeRecList_sublevel2(GroupID,0);
-}
-
-
-function MakeRecList_sublevel2(GroupID,SubGroupID) {
- MaxInGroup = -1;
- for (var i=0;i<recTitl.length;i++)
- {
- if (recGroup[i] == GroupID && recSubGroup[i] == SubGroupID) {
- var tmp = ""; var xx = "\uE003";
- for (var ii=2;ii<recTitl[i].length;ii++)
- {
- if (recTitl[i][(ii+1)]) {
- tmp += "\uE003\uE002" + recTitl[i][ii];
- xx = "/";
- } else {
- tmp += xx + recTitl[i][ii];
- }
- }
- if (get_recordings == 2 ) {
- result = recStrt[i];
- } else{
- AddInfo(i);
- if (recChan[i] !== "Media File") {result += "\uE003" + (recDura[i]/60).toFixed(0);}
- }
- if (rec_New[i] == "true" ) {
- recList[i] = "\uE010" + result + tmp; // recTitl[i];
- } else {
- recList[i] = "\uE003" + result + tmp; //recTitl[i];
- }
-
- MaxInGroup = MaxInGroup + 1;
- if ((recProt[i] == 1) && (ShowProtectedChannels == 1)) { recList[i] = "";}
-
- } else {
- recList[i] = "" ;
- }
- }
-}
-
-//
-//
-// End of sub-sublevel testing
-//
-//
-
-function AddInfo(info) {
-//Add Date to item
- date = new Date(Number(recStrt[info])*1000);
- year = date.getFullYear();
- month = date.getMonth();
- d = date.getDate();
- h = date.getHours();
- m = date.getMinutes();
- month=addzero(month + 1);
- d=addzero(d);
- h=addzero(h);
- m=addzero(m);
- if ( year==1970 ) {
- result = "\uE003";
- } else {
- result = "\uE003" + d + '-' + month + '-' + year + ' ' + h + ':' + m;
- }
-//
-}
-
-function showMediaList() {
- if (osdepginfo.style.opacity == 1) {osdepginfo.style.opacity = 0;}
- osdmedia.style.opacity = 0;
- osdtime.style.opacity = 0;
- var liststyle = "";
- listMed = currMed - 1;
- var MaxMed = -1;
-
- if (getRecOK == 1) {
- var htmlstring = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[38] + "(" + Lang[46] + (100 - perc_space) + "%, " + (free_space/1024).toFixed(0) + " GB) </center></h1><table border='0'><tr>";
-
- if (subgroup) {
- htmlstring = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Group_Header[Number(recGroup[currMed])] + "</center></h1><table border='0'><tr>";
- if (MaxInGroup < 14){ MaxMed = MaxInGroup; } else {MaxMed = 14; }
- }
- if (!subgroup) {
- for(var i=0; i<=nrMedia; i++) {
- if (recList[i]) { MaxMed += 1;}
- }
- }
-
- } else {
-
- if (nrMedia < 14) {MaxMed = nrMedia; } else {MaxMed = 14; }
- var htmlstring = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[11] + channelsnames[currChan] + " </center></h1><table border='0'><tr>";
- }
-
- if (MaxMed > 14) { MaxMed = 14; }
- if (MaxMed < 0 ) { MaxMed = 0; }
-
- for(var i=currMed; i<=currMed + MaxMed; i++) {
- if (listMed>=nrMedia) { listMed= -1; }
- if (listMed<-1) { listMed=nrMedia - 1; }
-// if (listMed>nrMedia) { listMed= -1; }
-
- do
- {
- listMed += 1;
- }
- while (!recList[listMed] && (listMed<=nrMedia));
-
- if ( listMed == currMed) {
- liststyle = " style='background:" + color_bg + ";-webkit-border-radius:25px;";
- } else {
- liststyle = " style='";
- }
-
-// alert(recList[listMed]);
-// alert(listMed + " : " + nrMedia);
- if (listMed > nrMedia) { recList[listMed] = ""; }
-
- if (recList[listMed]) {
- //Solves empty string at the end.
- htmlstring += "<td" + liststyle + "font-size:" + fsReclist + ";'>\uE003" + Left(recList[listMed],60) + "\uE003\uE003</td></tr>";
- }
- }
- medialist.innerHTML = htmlstring + "</table>";
- //ShowInfo();
-}
-
-function getServerSchedule() {
-try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + RestFulAPI + "/events/" + channels[currChan] + ".xml?timespan=" + serverEPGdays + "&" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- var x=xmlDoc.getElementsByTagName("event");
- nrMedia = x.length - 1;
- for (var i=0;i<x.length;i++)
- {
-
-/* // restful api layout dd 10/04/2013
- // <event>
- // 1 <param name="id">516</param>
- // 2 <param name="title">Thuis</param>
- // 3 <param name="short_text"/ >
- // 4 <param name="description">Soapserie (BE).</param>
- // 5 <param name="channel">S19.2E-53-1105-4016</param>
- // 6 <param name="channel_name">BVN (S)</param>
- // 7 <param name="start_time">1365608700</param>
- // 8 <param name="duration">1500</param>
- // 9 <param name="table_id">78</param>
- // 10 <param name="version">7</param>
- // 11 <param name="parental_rating">0</param>
- // 12 <param name="vps">0</param>
- // 13 <param name="images">0</param>
- // 14 <param name="components">
- // <component stream="1" type="1" language="dut" description="4:3"/ >
- // <component stream="2" type="1" language="dut" description=""/ ></param>
- // 15 <param name="contents">
- // 16 <content name="Soap/Melodrama/Folkloric"/ ></param>
- // 17 <param name="raw_contents"><raw_content name="21"/ ></param>
- // 18 <param name="timer_exists">false</param>
- // 19 <param name="timer_active">false</param>
- // 20 <param name="timer_id"/ >
- // </event>
-*/
-
- recTitl[i] = x[i].getElementsByTagName("param")[1].childNodes[0].nodeValue;
- try {
- recDesc[i] = x[i].getElementsByTagName("param")[3].childNodes[0].nodeValue;
- } catch(e) {
- recDesc[i] = "";
- }
- recDura[i] = x[i].getElementsByTagName("param")[7].childNodes[0].nodeValue;
- recStrt[i] = x[i].getElementsByTagName("param")[6].childNodes[0].nodeValue;
- recChan[i] = currChan + "\uE003-\uE003" + channelsnames[currChan];
- recGUID[i] = x[i].getElementsByTagName("param")[0].childNodes[0].nodeValue;
-
- date = new Date(Number(recStrt[i])*1000);
- year = date.getFullYear();
- month = date.getMonth();
- d = date.getDate();
- day = date.getDay();
- h = date.getHours();
- m = date.getMinutes();
- h=addzero(h);
- m=addzero(m);
- recList[i] = ''+days[day]+' '+d+' '+months[month]+' '+year+' '+h+':'+m + " " + recTitl[i];
-
- }
- getRecOK = 2;
- } catch(e) {
- alert("Get EPG problem: " + e);
- getRecOK = 0;
- medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[50] + "</center><pre>\n\n\n" + Lang[51] + "</pre></h1>";
- }
-}
-
-function getSchedule(schchan){
- SI = "";
- recTitl.length = 0;
- nrMedia = 0;
- try {
- StreamInfo(schchan);
-
- eitService = toi.statics.ToiDvbEitCacheServiceItem.create(SI[1],SI[2],SI[3]);
- eitCache.addService(eitService);
- event = eitCache.getPresentEvent(eitService);
- events = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000);
-
- if (event.name) {
- if (events.more) {
- var t = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000);
- events.infoSequence.concat(t.infoSequence);
- events.more = t.more;
- }
- nrMedia = events.infoSequence.length - 1;
- for (var i = 0; i < events.infoSequence.length; i++) {
-
- // Double info or scrollbar twice on the screen if nrMedia < 14
- while ((i > 0) && (events.infoSequence[i].eventId == events.infoSequence[(i-1)].eventId) && (nrMedia > 14)) {
- recList[i] = "";
- i += 1;
- }
-
- recTitl[i] = events.infoSequence[i].name;
- recDesc[i] = eitCache.getExtendedEventInfo(eitService,events.infoSequence[i].eventId).extendedInfo;
- if (recDesc[i] == "" ) { recDesc[i] = eitCache.getExtendedEventInfo(eitService,events.infoSequence[i].eventId).shortInfo;}
- recDura[i] = events.infoSequence[i].duration;
- recStrt[i] = events.infoSequence[i].time;
- recChan[i] = schchan + "\uE003-\uE003" + channelsnames[schchan];
- recGUID[i] = events.infoSequence[i].eventId;
-
- date = new Date(Number(recStrt[i])*1000);
- year = date.getFullYear();
- month = date.getMonth();
- d = date.getDate();
- day = date.getDay();
- h = date.getHours();
- m = date.getMinutes();
- h=addzero(h);
- m=addzero(m);
- recList[i] = ' ' + days[day] + ' ' + d + ' ' + months[month] + ' ' + year + " " + h + ":" + m + " (" + (recDura[i]/60).toFixed(0) + ") " + Left(recTitl[i],30);
- }
- getRecOK = 2;
- } else {
- getRecOK = 0;
-
- medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[11] + "</center><pre>\n\n\n" + Lang[52] + "</pre></h1>";
-
- if (experimental) {
- medialist.innerHTML += "<img src='" + channels[schchan] + ".jpg' style='width:100%; position:absolute; left:0%; top:-11%;'>";
- }
-
- }
- } catch(e) {
- getRecOK = 0;
- medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[11] + "</center><pre>\n\n\n" + Lang[53] + "</pre></h1>";
- }
-
-}
-
-
-
-function incMed(step) {
- currMed += step;
- if (currMed > nrMedia ) {
- currMed = 0;
- }
-}
-
-function decMed(step) {
- currMed -= step;
- if (currMed < 0) {
- currMed = nrMedia;
- }
-}
-
-function playRec(uri,posrec) {
- try {
- if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
- mediaPlayer.close();
- }
- if (osdepginfo.style.opacity == 1) {osdepginfo.style.opacity = 0;}
- mediaPlayer.open(uri);
- if (posrec) {
- mediaPlayer.playFromPosition(posrec,1000);
- } else {
- mediaPlayer.play(1000);
- }
- showDisplay("PLAY", false, 100, 0 );
- } catch (e) {
- alert("Failed opening recording: " + e);
- return;
- }
-}
-
-
-function pauseRec(uri) {
- try {
- if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
- mediaPlayer.close();
- }
- if (osdepginfo.style.opacity == 1) {osdepginfo.style.opacity = 0;}
- mediaPlayer.open(uri);
- mediaPlayer.play(0);
- showDisplay("PAUS", false, 100, 0 );
- } catch (e) {
- alert("Failed opening recording: " + e);
- return;
- }
-}
-
-
-
-function createNewAsset() {
- try {
- assetId = ams.createAsset(ams.ASSET_PVR);
-// alert("Created " + assetId);
- } catch(e) {
- alert("Couldn't create asset: " + e);
- }
-}
-
-function onStateChanged(ev) {
-// alert("Media player state changed: state=" + ev.state + ", reason=" + ev.reason + ", code=" + ev.code);
-
- if ( ( ev.state == 6 && ev.reason == "HostUnreachable" ) || ( ev.state == 2 && ev.reason == "PositionEnd" )) {
- BackToTV();
- }
-
-}
-
-// Start recording/ timeshift
-
-function ServerRecordStart() {
-//Record current program
-
- try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + recServ + "/addTimer?guid=" + channels[currChan] + "&" + new Date().getTime() ),false);
- xmlhttp.send();
-
- if (xmlhttp.responseXML == null) {
- //settimer(EPG[NowNext][2][currChan],Lang[55],0,2);
- //Timer not set, try direct recording
- ServerRecord();
- settimer(0,Lang[57],0,2);
- } else {
- settimer(EPG[NowNext][2][currChan],EPG[NowNext][1][currChan],0,2);
- }
-
- } catch(e) {
- alert("Sending Timers to server problem: " + e);
- settimer(0,Lang[55],0,2,ErrorColor);
- }
-
-}
-
-
-function ServerRecord() {
-//Instant record on server
-
- try {
- xmlhttp=new XMLHttpRequest();
- //switch server to current channel
- xmlhttp.open("POST",(server_ip + RestFulAPI + "/remote/switch/" + channels[currChan]),true);
- xmlhttp.send();
- //start recording
- setTimeout("xmlhttp.open('POST',(server_ip + RestFulAPI + '/remote/Record'),false);xmlhttp.send();",5000);
- } catch(e) {
- alert("Sending key to server problem: " + e);
- settimer(0,Lang[55],0,2,ErrorColor);
- }
-
-//end of function
-}
-
-
-
-function ServerPause() {
-//Instant pause on server
- ServerRecord();
- settimer(EPG[NowNext][2][currChan],Lang[70],0,2);
- setTimeout("getPauseFile();",6000);
-//end of function
-}
-
-
-
-
-function getPauseFile() {
-
-try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + RestFulAPI + "/recordings.xml?" + new Date().getTime()),false);
- xmlhttp.send();
- xmlDoc=xmlhttp.responseXML;
- var x=xmlDoc.getElementsByTagName("recording");
- nrMedia = x.length - 1;
- for (var i=0;i<x.length;i++)
- {
- var xx = x[i].getElementsByTagName("param")[2].childNodes[0].nodeValue.split(".");
- xx = xx[(xx.length-2)].split("-");
-
- if ( xx[0] == currChan ) {
- recLink[0] = server_ip + recServ + x[i].getElementsByTagName("param")[2].childNodes[0].nodeValue;
- }
-
- }
-
- } catch(e) {
- alert("Get Recordings problem: " + e);
- }
- getRecOK = 0;
- recDura[0] = 0; // 3600;// set to 1 hour
- LoadMediaSettings();// sets currMed to 0
- recTitl[0] = "Time Shift File"
- position = 0;
- pauseRec(recLink[0]);
-
-}
-
-
-
-function ServerTimer(guid,evid) {
-
-try {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET",(server_ip + recServ + "/addTimer?guid=" + guid + "&evid=" + evid + "&" + new Date().getTime() ),false);
- xmlhttp.send();
- } catch(e) {
- alert("Sending Timers to server problem: " + e);
- }
-
-
-}
-
-
-
-function BackToTV() {
- play(channels[currChan]);
- if (isPause == 1 || localRecording == 1) {
- UnloadMediaSettings();
- } else {
- medialist.style.opacity = 0.9;
- showDisplay("STOP", false, 100, 0 );
- showMediaList();
- AvInfo.length = 0;
- }
-}
-
-
-function onRecorderStateChanged(event) {
-// alert("EVENT! " + event.reason + " *** " + event.state);
- RECicon = "\uE003"; // 0xE003 0x83 Fixed width blank
- switch (event.state) {
- case mediaRecorder.STATE_IDLE:
- // "STATE_IDLE";
- break;
- case mediaRecorder.STATE_CONNECTING:
- // "STATE_CONNECTING";
- break;
- case mediaRecorder.STATE_PAUSED:
- // "STATE_PAUSED";
- break;
- case mediaRecorder.STATE_RECORDING:
- // "STATE_RECORDING";
- RECicon = "\uE00B"; // 0xE00B 0x8B REC
- break;
- case mediaRecorder.STATE_FAILED:
- // "STATE_FAILED";
- RECicon = "\uE01A"; // Bomb Icoon
- break;
- }
-
-}
-
-function ShowMediaOSD() {
-if (get_recordings == 1) {
- // Display Name/ length
- var pos = position + (mediaPlayer.getPosition()/1000);
- var pos2 = (pos / Number(recDura[currMed])) * 100;
- if (pos2 < 1) { pos2 = 1;}
- if (pos2 >100) {pos2 = 100;} // in case of viewing while still recording.
- if (pos>recMark[posMark] && recMark.length-1>posMark) { posMark += 1;}
- pos2 = ((pos2 * 140) / 100).toFixed(0); // make it 40% bigger
- var pos5 = "\uE007" + new Array(pos2 - 1).join("\uE008") + new Array(140 - pos2).join("\uE009") + "\uE00A"
- var pos4 = "";
- var pos6 = pos5;
- var fontc = color_progress1;
- var x = 0;
- for (var i=0; i<recMark.length; i++) {
- var pos3 = recMark[i] / Number(recDura[currMed]) * 100;
- pos3 = ((pos3 * 140) / 100).toFixed(0); // make it 40% bigger
- pos4 += fontc + Left(pos6,pos3 - x);
- if (fontc == "</font>" + color_progress2) { fontc = "</font>" + color_progress1; } else { fontc = "</font>" + color_progress2;}
- x = pos3;
- pos6 = Right(pos5,140 - pos3);
- }
- pos4 += "</font>" + color_progress1 + pos6 + "</font>";
- var x = (Number(recDura[currMed])/60).toFixed(0);
- if (pos/60 > x) { x = (pos/60).toFixed(0);}
- date_time();
- osdtime.innerHTML = result;
- date_time_rec();
- osdmedia.innerHTML = "<pre style='" + color_media_osd + ";font-size:" + fsMedia +";'> \n " + (pos/60).toFixed(0) + " / " + x + " " + Left(recTitl[currMed],40) + "\n " + pos4 + "\n " + result + " </pre>";
-} else if ( get_recordings == 2) {
- var pos = position + (mediaPlayer.getPosition()/1000);
- date_time();
- osdtime.innerHTML = result;
- osdmedia.innerHTML = "<pre style='" + color_media_osd + ";font-size:" + fsMedia +";'> \n " + (pos/60).toFixed(0) + " \n " + Left(recTitl[currMed],40) + "\n \n " + recStrt[currMed] + " </pre>";
-}
-}
-
-function ShowInfo() {
-//Like Show EPG Info
- if ( medialist.style.opacity == 0 ) { updateStreamInfo(currMed);} else { AvInfo[currMed] = "";}
- if (get_recordings == 2) {
- result = recStrt[currMed]
- osdepginfo.innerHTML = "<center><pre style='" + color_epg_head + ";'>" + Left(recTitl[currMed],60)
- + "\n </pre><p style='" + color_epg_avinfo + ";'>" + AvInfo[currMed]
- + "</p><pre style='" + color_epg_title + ";'> " + result + "\n "
- + "???" + Lang[54]
- + "</pre><p style='" + color_epg_info + ";'> Sorry STREAMDEV-plugin : " + Lang[37] + "</p></center>";
- } else {
- date = new Date(Number(recStrt[currMed])*1000);
- year = date.getFullYear();
- month = date.getMonth();
- d = date.getDate();
- day = date.getDay();
- h = date.getHours();
- m = date.getMinutes();
- h = addzero(h);
- m = addzero(m);
- result = '' + days[day] + ' ' + d + ' ' + months[month] + ' ' + year + ' ' + h + ':' + m;
-
- if (year!==1970) {
- osdepginfo.innerHTML = "<center><pre style='" + color_epg_head + ";'>" + Left(recTitl[currMed],60)
- + "</pre><p style='" + color_epg_avinfo + ";'>" + AvInfo[currMed]
- + "</p><pre style='" + color_epg_title + ";'> " + result + "\n "
- + (recDura[currMed] / 60).toFixed(0) + Lang[54] + "\n " + recChan[currMed] + " "
- + "\n </pre><p style='" + color_epg_info + ";'>" + Left(recDesc[currMed],750) + "</p></center>";
- } else {
- //info for non-vdr recordings
- osdepginfo.innerHTML = "<center><pre style='" + color_epg_head + ";'>" + Left(recTitl[currMed],60)
- + "\n </pre><p style='" + color_epg_avinfo + ";'>" + AvInfo[currMed] + " " + "\n \n </p></center>";
- }
- }
-}
-
-function onScheduledStart(event) {
- // event is of type ToiSchedulerServiceBooking, see docs
- var timertype = event.booking.category;
-
- if ( timertype == "SwitchOnly") {
- ClearScreen();
- isFullscreen = 1; FullScreen();
- isVisible = 0; setVisible(isVisible);
-
- //Switch from recordings
- if (isMediaMenu) {
- if (medialist.style.opacity == 0) {setResume();} // No mediamenu on screen so set resume.
- UnloadMediaSettings();
- }
-
- prevChan = currChan;
- currChan = Number(ss.getParameter(event.booking.id, "Channel"));
- ChanGroup = Number(Left((currChan / 1000),1));
-
- // check if Group isn't protected
- if ((protChn[ChanGroup] == 1) && (ShowProtectedChannels == 1)) {
- currChan = prevChan;
- ChanGroup = Number(Left((currChan / 1000),1));
- }
-
- // switch only if not already on that channel.
- if (currChan !== prevChan) {
- play(channels[currChan]);
- }
- ss.remove(event.booking.id);
- setOSDtimer();
- } else {
- try {
- createNewAsset();
-
- var recChannr = Number(ss.getParameter(event.booking.id, "Channel"));
- var recGroup = Number(Left((recChannr / 1000),1));
- var recChan = 0;
- if (ServerAdres[recGroup] == "MultiCast" ) {
- SI=channels[recChannr].split("-");
- recChan = SI[4];
- } else {
- recChan = ServerAdres[recGroup] + channels[recChannr];
- }
-
- mediaRecorder.open(recChan, assetId);
-
- var propList = new Array(ams.PROPERTY_SYSTEM_PLAYBACKURI);
- var properties = ams.getProperties(assetId, propList);
- var assetURI = properties[0].value;
-
- // save the assetId in the booking
- ss.setParameter(event.booking.id, "assetURI", assetURI);
- ss.setParameter(event.booking.id, "assetId", assetId);
- ss.setParameter(event.booking.id, "active", "True");
- ss.setParameter(event.booking.id, "Type", "\uE00B");
-
- mediaRecorder.record();
-// alert("Recording to " + assetURI);
- }
- catch (e) {
- alert(e);
- }
- }
-}
-
-
-function onScheduledStop(event) {
- var timertype = event.booking.category;
- if ( timertype == "SwitchOnly") {
- ss.remove(event.booking.id);
- setOSDtimer();
- } else {
- try {
- ss.setParameter(event.booking.id, "active", "False");
- ss.setParameter(event.booking.id, "Type", "\uE01C");
- mediaRecorder.close();
- }
- catch (e) {
- alert(e);
- }
- }
-
-}
-
-
-function ClearScreen() {
- isSchedule = 0; schedule.style.opacity = 0;
- isSetupMenu = 0;
- epgactive = 0;
- osdepginfonext.style.opacity = 0;
- osdepginfo.style.opacity = 0;
- mainmenu.style.opacity = 0;
-}
</script>
diff --git a/main.js b/main.js
new file mode 100644
index 0000000..82dee76
--- /dev/null
+++ b/main.js
@@ -0,0 +1,5161 @@
+window.onkeydown = onKeyDown;
+
+function onLoad() {
+
+ is = toi.informationService;
+ ss = toi.schedulerService;
+ aos = toi.audioOutputService;
+ vos = toi.videoOutputService;
+ fps = toi.frontPanelService;
+ ams = toi.assetManagerService;
+
+ GetSettings();
+ createPlayer();
+ createEitCache();
+
+ if(pipPlayer){
+ addPipVideoplane();
+ createPip();
+ }
+ if(PipSwitchGuide){
+ createPip();
+ }
+
+ embedTeletextPlugin();
+ aos.setVolume(AudioOut, StartVolume);
+ aos.setMuteState(AudioOut, false);
+ showDisplay(currChan.toString(), false, 100, 0 );
+ play(channels[currChan]);
+
+ if (EPGMode) {
+ eitCache.setFilterMode(eitCache.FILTER_MODE_PF_AND_SCHEDULE);
+ } else {
+ eitCache.setFilterMode(eitCache.FILTER_MODE_PF_ONLY);
+ }
+ eitCache.addEventListener(eitCache.ON_CACHE_UPDATED, onCacheUpdated);
+ mediaPlayer.addEventListener(mediaPlayer.ON_DATA_AVAILABLE,onDataAvailableEvent);
+ mediaPlayer.addEventListener(mediaPlayer.ON_STATE_CHANGED, MPD);
+
+ if (is.getObject("var.capabilities.dvr") == "FALSE") {
+ mediaRecorder = 0;
+ // No harddisk, no recorder functions possible
+ }
+
+ if (is.getObject("config.architecture.target") !== "vip1903" && fullupdate !== 2) {
+ fullupdate = 0;
+ // No 19x3 so better turn fullupdate EPG off
+ }
+
+ if (mediaRecorder) {
+ createRecorder();
+ mediaRecorder.addEventListener(mediaRecorder.ON_STATE_CHANGED, onRecorderStateChanged);
+ om = toi.assetManagerService.getAssetOperationManager(); //toi.OperationManager;
+ rma = om.createOperation("Remove Asset");
+ }
+
+ is.addEventListener(is.ON_OBJECTS_CHANGED, onEvent);
+ is.subscribeObject(onEvent, "var.io.state", true);
+
+ ss.addEventListener(ss.ON_SCHEDULED_START, onScheduledStart);
+ ss.addEventListener(ss.ON_SCHEDULED_STOP, onScheduledStop);
+ ss.setCategorySubscription(onScheduledStart, "*");
+ ss.setCategorySubscription(onScheduledStop, "*");
+
+ setOSDscale();
+ SetupFonts();
+
+ setOSDtimer();
+ showOSD();
+ videoplane.subtitles = Boolean(ShowSubs);
+ colorkeys.innerHTML = "<font color=red> " + NN[4] + " </font><font color=green > " + NN[1] + " </font><font color=yellow> " + NN[2] + " </font><font color=blue> " + NN[5] + " </font>";
+ medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[0] + "</center></h1>";
+}
+
+function SetupFonts() {
+//setup fontsize
+ colorkeys.style.fontSize = fsKeys;
+ osdvolume.style.fontSize = fsCA;
+ osdtime.style.fontSize = fsTime;
+ osdname.style.fontSize = fsName;
+ osdepg.style.fontSize = fsEpg;
+ osdca.style.fontSize = fsCA;
+ switchtimer.style.fontSize = fsEpg;
+ osdepginfo.style.fontSize = fsEpginfo;
+ osdepginfonext.style.fontSize = fsEpginfo;
+ osdnr.style.fontSize = fsChan;
+ osdlang.style.fontSize = fsAudio;
+//setup fontcolors/ backgroundcolor
+ document.body.style.backgroundColor = "#ccc";
+ osdvolume.style.color = "green";
+ osdtime.style.color = "white";
+ osdname.style.color = "black";
+// osdname.style.color = "yellow";
+ osdepg.style.color = "white";
+ osdca.style.color = "black";
+// osdca.style.color = "yellow";
+ switchtimer.style.color = "white";
+ switchtimer.style.background = DefaultBGColor;
+ osdnr.style.background = "red";
+ var i = "#3366ff";
+// var i = "#101010";
+ osdmedia.style.background = i;
+ osdmain.style.background = i;
+ schedule.style.background = i;
+ mainmenu.style.background = i;
+ medialist.style.background = i;
+ osdepginfo.style.background = i;
+ osdepginfonext.style.background = i;
+ channellist.style.background = "#bbb";
+ osdnr.style.color = "black";
+ osdlang.style.color = "white";
+}
+
+
+function GetSettings() {
+ //test for settings, create if not excists.
+ try {
+ if (!is.getObject("vip.serveraddress")) {}
+ } catch(e) {
+ is.setObject("vip.serveraddress","0",is.STORAGE_PERMANENT)
+ }
+
+ try {
+ if (!is.getObject("vip.languagepriority")) {}
+ } catch(e) {
+ is.setObject("vip.languagepriority","0",is.STORAGE_PERMANENT)
+ }
+
+ try {
+ if (!is.getObject("vip.OSDlanguage")) {}
+ } catch(e) {
+ is.setObject("vip.OSDlanguage","0",is.STORAGE_PERMANENT)
+ }
+
+ try {
+ if (!is.getObject("vip.testing")) {}
+ } catch(e) {
+ is.setObject("vip.testing","0",is.STORAGE_PERMANENT)
+ }
+
+
+ try {
+ if (!is.getObject("vip.resolution")) {}
+ } catch(e) {
+ is.setObject("vip.resolution","2",is.STORAGE_PERMANENT)
+ }
+
+ try {
+ if (!is.getObject("vip.testing2")) {}
+ } catch(e) {
+ is.setObject("vip.testing2","0",is.STORAGE_PERMANENT)
+ //show info if channel is on hardcoded list of non free
+ }
+
+ try {
+ if (!is.getObject("vip.fav_max_channel")) {}
+ } catch(e) {
+ is.setObject("vip.fav_max_channel","0",is.STORAGE_PERMANENT)
+ }
+
+ try {
+ if (!is.getObject("vip.showsubs")) {}
+ } catch(e) {
+ is.setObject("vip.showsubs","1",is.STORAGE_PERMANENT)
+ }
+
+
+ var sel_group;
+ for (var i=0;i<10;i++) {
+ sel_group = "vip.group." + i;
+ try {
+ if (!is.getObject(sel_group)) {}
+ } catch(e) {
+ if (!minChan[i]) {
+ is.setObject(sel_group,"0",is.STORAGE_PERMANENT)
+ } else {
+ is.setObject(sel_group,"1",is.STORAGE_PERMANENT)
+ }
+ }
+ }
+
+ for (var i=0;i<10;i++) {
+ if (minChan[i]) {minchan[i] = minChan[i];}
+ sel_group = "vip.group." + i;
+ if (is.getObject(sel_group) == "0") { minChan[i] = "";}
+ }
+
+ audio = Number(is.getObject("vip.languagepriority"));
+ server_ip = server_ip_array[Number(is.getObject("vip.serveraddress"))];
+ for (var i=0;i<10;i++) { if (ServerAdres[i] !== "FullURL" && ServerAdres[i] !== "MultiCast") {ServerAdres[i] = server_ip + StreamPort;} }
+ ServerAdres[Fav_group] = server_ip + StreamPort;
+
+ lang_nr = Number(is.getObject("vip.OSDlanguage"));
+ loadjs(langfile[lang_nr]);
+
+ experimental = Number(is.getObject("vip.testing"));// Use some experimental code
+ testing2 = Number(is.getObject("vip.testing2"));// Use some experimental code
+ ShowSubs = Number(is.getObject("vip.showsubs"));
+
+ Set_Res = Number(is.getObject("vip.resolution"));
+ VideoOutput();
+ Read_Fav();
+
+ is.setObject("cfg.media.subtitling.languagepriority",subs_prio,is.STORAGE_PERMANENT);
+ // set default subtitle language to
+
+
+ //if needed types can be set here. Default of the box is normal.
+ //is.setObject("cfg.media.subtitling.typepriority","hearing_impaired",is.STORAGE_PERMANENT);
+ //is.setObject("cfg.media.subtitling.typepriority","normal",is.STORAGE_PERMANENT);
+ //is.setObject("cfg.media.audio.typepriority","normal",is.STORAGE_PERMANENT);
+ //is.setObject("cfg.media.audio.typepriority","hearing_impaired",is.STORAGE_PERMANENT);
+ //is.setObject("cfg.media.audio.typepriority","visually_impaired",is.STORAGE_PERMANENT);
+
+
+ for (var x = 0; x < 10; x++) {
+ searchtimers[x] = "" ; // To solve displaying undefined
+ timers[x] = "" ;
+ if (maxChan[x]) { //check changed to maxChan because minChan can be unset from menu
+ for (var i = minChan[x]; i < (maxChan[x]+1); i++) {
+ EPG[0][4][i] = "";EPG[1][4][i] = "";EPG[0][5][i] = "";EPG[1][5][i] = "";
+ EPG[0][7][i] = "";EPG[1][7][i] = "";AvInfo[i] = "";
+ }
+ }
+ }
+ for (var i = minChan[Fav_group]; i < (maxChan[Fav_group]+10); i++) {
+ EPG[0][4][i] = "";EPG[1][4][i] = "";EPG[0][5][i] = "";EPG[1][5][i] = "";EPG[0][7][i] = "";EPG[1][7][i] = "";AvInfo[i] = "";
+ }
+ //Check if there is a SmartTV or Restfulapi VDR server plugin but not when box ip isn't the same range as server ip
+ test_ip = server_ip.split(".");
+ box_ip = (is.getObject("config.ipaddress")).split(".");
+
+ if (("http://" + box_ip[0] == test_ip[0]) && (box_ip[1] == test_ip[1]) && (box_ip[2] == test_ip[2])) {
+ CheckPlugins();
+ }
+
+// override check for testing :
+// smartTVplugin = 0 ;
+// Restfulapiplugin = 1;
+ if (smartTVplugin && Restfulapiplugin == 0) {
+ // smartTVplugin YES
+ // Restfulapiplugin NO
+ get_timer = 1;
+ if (get_recordings == 0 ) {get_recordings = 1;}
+ get_marks = 1;
+ } else if (smartTVplugin == 0 && Restfulapiplugin) {
+ // smartTVplugin NO
+ // Restfulapiplugin YES
+ get_timer = 0;
+ if (get_recordings == 1 ) {get_recordings = 0;}
+ get_marks = 0;
+ } else if (smartTVplugin == 0 && Restfulapiplugin == 0) {
+ // smartTVplugin NO
+ // Restfulapiplugin NO
+ get_recordings = 2; //from streamdev
+ }
+}
+
+function loadjs(filename){
+ var oHead = document.getElementsByTagName('HEAD').item(0);
+ var oScript= document.createElement("script");
+ oScript.type = "text/javascript";
+ oScript.src= filename;
+ oHead.appendChild( oScript);
+}
+
+function onEvent(event) {
+var numObjs = event.objectNames.length;
+ for (var i=0; i<numObjs; i++) {
+ if(event.objectNames[i] == "var.io.state" && is.getObject(event.objectNames[i]) == "standby" && KillStream == 1){
+ try {
+ if (isMediaMenu) {
+ if (medialist.style.opacity == 0) {setResume();} // No mediamenu on screen so set resume.
+ }
+ mediaPlayer.close();
+ SetLed(2,2,0);// At request no more blinking on standby.
+
+ } catch(e) {
+ alert(e);
+ }
+ } else if(event.objectNames[i] == "var.io.state" && is.getObject(event.objectNames[i]) == "normal" && KillStream == 1){
+ play(channels[currChan]);
+ if(isMediaMenu) {
+ if (mediaList.style.opacity == 0) {
+ if (get_recordings == 1) {
+ setTimeout("GetMarks(); getResume(); playRec(recLink[currMed]+ '?mode=streamtoend&time=' + position);",100);
+ } else if (get_recordings == 2) {
+ setTimeout("playRec(recLink[currMed]+ '?pos=time.' + position);",100);
+ }
+
+ } else {
+ showDisplay("STOP", false, 100, 0 );
+ showMediaList();
+ }
+ }
+ }
+ }
+}
+
+function onUnload() {
+ try {
+ mediaPlayer.close();
+ mediaPlayer.releaseInstance();
+ if(TimeShift){
+ mediaPlayer.stopTimeshiftBuffering();
+ mediaPlayer.discardTimeshiftBuffer();
+ }
+ if(mediaRecorder){
+ om.releaseOperation(rma);
+ mediaRecorder.close();
+ mediaRecorder.releaseInstance();
+ }
+ if(pipPlayer){
+ pipPlayer.close();
+ pipPlayer.releaseInstance();
+ }
+
+ is.removeEventListener(is.ON_OBJECTS_CHANGED, onEvent);
+ eitCache.removeEventListener(eitCache.ON_CACHE_UPDATED, onCacheUpdated);
+ mediaPlayer.removeEventListener(mediaPlayer.ON_DATA_AVAILABLE,onDataAvailableEvent);
+ mediaPlayer.removeEventListener(mediaPlayer.ON_STATE_CHANGED, MPD);
+ mediaRecorder.removeEventListener(mediaRecorder.ON_STATE_CHANGED, onRecorderStateChanged);
+
+ } catch(e) {
+ alert(e);
+ }
+}
+
+function incChan(step) {
+ currChan += step;
+ if (currChan > maxChan[ChanGroup]) {
+ currChan = minChan[ChanGroup];
+ }
+ osdnr.style.opacity = isFullscreen;
+ OSDchannr(currChan);
+}
+
+function decChan(step) {
+ currChan -= step;
+ if (currChan < minChan[ChanGroup] ) {
+ currChan = maxChan[ChanGroup] ;
+ }
+ osdnr.style.opacity = isFullscreen;
+ OSDchannr(currChan);
+}
+
+function VolumeUp() {
+ if (Volume < 5) {
+ var VolStep = 1;
+ } else {
+ var VolStep = VolumeStep;
+ }
+
+ Volume += VolStep;
+ if (Volume > 100) {
+ Volume = 100;
+ }
+ aos.setVolume(AudioOut, Volume);
+ showVolume();
+}
+
+function VolumeDown() {
+ if (Volume > 5) {
+ var VolStep = VolumeStep;
+ } else {
+ var VolStep = 1;
+ }
+
+ Volume -= VolStep;
+ if (Volume < 0) {
+ Volume = 0;
+ }
+ aos.setVolume(AudioOut, Volume);
+ showVolume();
+}
+
+
+function VolumeMute() {
+ state = aos.getMuteState(AudioOut);
+ aos.setMuteState(AudioOut, !state);
+ mute = 1 - state;
+ osdmute.style.opacity = mute;
+}
+
+function createEitCache() {
+ try {
+ eitCache = toi.dvbEitService.createInstance();
+ } catch(e) {
+ alert("Failed getting eitCache: " + e);
+ }
+}
+
+function createPlayer() {
+ try {
+ mediaPlayer = toi.mediaService.createPlayerInstance();
+ } catch(e) {
+ alert("Failed creating player: " + e);
+ }
+}
+
+
+function createRecorder() {
+ try {
+ mediaRecorder = toi.mediaService.createRecorderInstance();
+ } catch(e) {
+ alert("Cannot create media recorder: " + e);
+ mediaRecorder = "";
+ }
+}
+
+function createPip() {
+ try {
+ pipPlayer = toi.mediaService.createPipPlayerInstance();
+ } catch(e) {
+ alert("Failed creating PIP player: " + e);
+ }
+}
+
+
+function addPipVideoplane() {
+ var pipVideoDiv = document.getElementById("pipVideoDiv");
+ pipVideoDiv.innerHTML = "<videoplane id='pipvideoplane' index=1 style='position:fixed;left:70%;top:60%;height:20%;width:20%;z-index:50;'></videoplane>";
+ document.body.appendChild(pipVideoDiv);
+}
+
+function pipplay(uri) {
+try {
+ if (pipPlayer.getState() != pipPlayer.STATE_IDLE) {
+ pipPlayer.close();
+ }
+ if (PIPDelayID != -1) { clearTimeout(PIPDelayID); PIPDelayID = -1; }
+
+ if (ServerAdres[ChanGroup] == "MultiCast" ) {
+ SI=channels[currChan].split("-");
+ uri = SI[4];
+ } else if (ServerAdres[ChanGroup] == "FullURL" ) {
+ // uri = ready!
+ } else {
+ uri = ServerAdres[ChanGroup] + uri;
+ }
+ pipPlayer.open(uri);
+ PIPDelayID = setTimeout("pipPlayer.play(1000);", 500);
+ } catch (e) {
+ alert("Failed opening PIP stream: " + e);
+ return;
+ }
+}
+
+
+function play(uri) {
+ try {
+ if (initialDelayID != -1) { clearTimeout(initialDelayID); initialDelayID = -1; }
+ if (PlayDelayID != -1) { clearTimeout(PlayDelayID); PlayDelayID = -1; }
+ if (initialDelayPlayID != -1) { clearTimeout(initialDelayPlayID); initialDelayPlayID = -1; }
+
+ if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) { mediaPlayer.close(); }
+ if (isSchedule) { schedule.style.opacity = 0; isSchedule = 0;}
+ if (epgactive) { osdepginfo.style.opacity = 0; osdepginfonext.style.opacity = 0; epgactive = 0;}
+
+ if (ServerAdres[ChanGroup] == "MultiCast" ) { SI=channels[currChan].split("-"); uri = SI[4];
+ } else if (ServerAdres[ChanGroup] == "FullURL" ) { // uri = ready!
+ } else { uri = ServerAdres[ChanGroup] + uri; }
+
+ URL = uri;
+ initialDelayPlayID = setTimeout("mediaPlayer.open(URL);mediaPlayer.play(1000);GetEPG(currChan);ExtraStuff();",initialDelayPlay);
+ initialDelayPlay = 500; // wait 500 ms before zap to next channel
+ PlayDelayID = setTimeout("initialDelayPlay = 0;",5000);
+ SetLed(1,1,0);
+
+ if(isFullscreen) { showOSD(); }
+
+ showDisplay(currChan.toString(), false, 100, 0 );
+
+ } catch (e) {
+ alert("Failed opening stream: " + e);
+ return;
+ }
+}
+
+function preview(urip) {
+ if(SwitchGuide) {
+ play(urip);
+ } else if (PipSwitchGuide && fullupdate) {
+ pipplay(urip);
+ }
+
+ if (isSchedule) { schedule.style.opacity = 0; isSchedule = 0;}
+ if (epgactive) { osdepginfo.style.opacity = 0; osdepginfonext.style.opacity = 0; epgactive = 0;}
+ showChannelList();
+}
+
+
+function onDataAvailableEvent(event) {
+ dataAvailable = event.status;
+ //alert("onDataAvailableEvent : " + event.status);
+ if(event.status==true) {
+ updateStreamInfo(currChan);
+ }
+}
+
+
+function updateStreamInfo(currStream) {
+
+var streamInfo = mediaPlayer.getStreamInfo();
+var cList = streamInfo.availableComponents;
+var x;
+var xs = 0;
+var subs = "";
+if (currMed!= -1) {
+ if (streamInfo.playTime != -1) {
+ recDura[currMed] = streamInfo.playTime;
+ }
+}
+xx = 0;
+AvInfo[currStream] = "";
+lang_prio_dyn.length = 0;
+subs_prio_dyn.length = 0;
+Radioicon = "\uE00E";
+
+for(x=0; x<cList.length;x++) {
+ if(cList[x].type == 0) {
+ lang_prio_dyn[xx] = mediaPlayer.getAudioStreamInfo(cList[x]).language;
+ AvInfo[currStream] = AvInfo[currStream] + " Audio " + xx + " " + mediaPlayer.getAudioStreamInfo(cList[x]).encoding + " - " + mediaPlayer.getAudioStreamInfo(cList[x]).language + " , ";
+
+ //
+// alert (mediaPlayer.getAudioStreamInfo(cList[x]).sampleRate);
+// alert (mediaPlayer.getAudioStreamInfo(cList[x]).channelFormat);
+ // AUDIO_CHANNEL_FORMAT_UNKNOWN = 0
+ // AUDIO_CHANNEL_FORMAT_SINGLE_MONO = 1
+ // AUDIO_CHANNEL_FORMAT_DUAL_MONO = 2
+ // AUDIO_CHANNEL_FORMAT_STEREO = 3
+ // AUDIO_CHANNEL_FORMAT_3_FRONT_1_BACK = 4
+ // AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK = 5
+ // AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK_LFE = 6
+ // AUDIO_CHANNEL_FORMAT_3_FRONT_2_SIDE_2_BACK_LFE = 7
+// alert (mediaPlayer.getAudioStreamInfo(cList[x]).channelMode);
+ // AUDIO_CHANNEL_MODE_NORMAL = 0
+ // AUDIO_CHANNEL_MODE_DUAL_MONO_LEFT_ONLY = 1
+ // AUDIO_CHANNEL_MODE_DUAL_MONO_RIGHT_ONLY = 2
+ // AUDIO_CHANNEL_MODE_DUAL_MONO_STEREO = 3
+ // AUDIO_CHANNEL_MODE_DUAL_MONO_MIXED = 4
+
+ if (lang_prio_dyn[xx] !== "NAR") {
+ xx += 1;
+ } else {
+ lang_prio_dyn.length = xx;
+ }
+
+
+ }
+ if(cList[x].type == 1) {
+ Radioicon = "\uE00F";
+ AvInfo[currStream] = AvInfo[currStream] + " Video " + mediaPlayer.getVideoStreamInfo(cList[x]).encoding + " size : " + mediaPlayer.getVideoStreamInfo(cList[x]).resolutionX + " x " + mediaPlayer.getVideoStreamInfo(cList[x]).resolutionY;
+ if (mediaPlayer.getVideoStreamInfo(cList[x]).aspectRatio == "0") { AvInfo[currStream] = AvInfo[currStream] + " (?:?)"; }
+ if (mediaPlayer.getVideoStreamInfo(cList[x]).aspectRatio == "1") { AvInfo[currStream] = AvInfo[currStream] + " (4:3)"; }
+ if (mediaPlayer.getVideoStreamInfo(cList[x]).aspectRatio == "2") { AvInfo[currStream] = AvInfo[currStream] + " (16:9)"; }
+ }
+
+ if(cList[x].type == 2) {
+ if (xs == 0) { subs = " SUBS : " } else { subs += " , ";}
+ subs_prio_dyn[xs] = mediaPlayer.getSubtitleStreamInfo(cList[x]).language;
+ subs = subs + subs_prio_dyn[xs];
+ xs += 1;
+ }
+
+ if(cList[x].type == 3) {
+ alert("COMPONENT_SUBTITLE_CAPTION");
+ //This is an ARIB specific type of subtitles
+ }
+ if(cList[x].type == 4) {
+ alert("COMPONENT_SUBTITLE_SUPERIMPOSE");
+ //This is an ARIB specific type of subtitles and used mainly for displaying alert messages on screen.
+ }
+ if(cList[x].type == 5) {
+// alert("TeletextStreamInfo : " + mediaPlayer.getTeletextStreamInfo(cList[x]).language)
+ AvInfo[currStream] += " TXT";
+ }
+
+
+ }
+ AvInfo[currStream] += subs;
+}
+
+
+function VideoOutput() {
+
+videoConfig = vos.getVideoConfiguration();
+
+ var session = null;
+ try {
+ var currentOutput = 0; //0 = normaly HDMI
+ displayInfo=videoConfig.getDisplayInfo(videoConfig.getVideoOutputs()[currentOutput]);
+ var desiredMode = VideoOutputModes[Set_Res];
+
+ // create the session
+ session = vos.createVideoConfigurationSession();
+ session.setDefaultVideoMode(videoConfig.getVideoOutputs()[currentOutput], desiredMode);
+ session.apply();
+ session.releaseInstance();
+
+ }
+ catch (e) {
+ if (session != null) {
+ session.releaseInstance();
+ }
+ alert(e);
+ }
+
+setOSDscale();
+SetupFonts();
+
+}
+
+function setOSDscale() {
+ fsAudio = (16*Yfactor[Set_Res]) + "px";
+ fsTime = (16*Yfactor[Set_Res]) + "px";
+ fsName = (27*Yfactor[Set_Res]) + "px";
+ fsMenu = (27*Yfactor[Set_Res]) + "px";
+ fsChan = (43*Yfactor[Set_Res]) + "px";
+ fsCA = (32*Yfactor[Set_Res]) + "px";
+ fsMenuMain = (35*Yfactor[Set_Res]) + "px";
+ fsEpg = (19*Yfactor[Set_Res]) + "px";
+ fsEpginfo = (21*Yfactor[Set_Res]) + "px";
+ fsList = (18*Yfactor[Set_Res]) + "px";
+ fsSchedList = (18*Yfactor[Set_Res]) + "px";
+ fsSched = (26*Yfactor[Set_Res]) + "px";
+ fsRec = (35*Yfactor[Set_Res]) + "px";
+ fsReclist = (19*Yfactor[Set_Res]) + "px";
+ fsMedia = (27*Yfactor[Set_Res]) + "px";
+ fsKeys = (19*Yfactor[Set_Res]) + "px";
+}
+
+function addzero(zero)
+{
+if (zero<10)
+ {
+ zero="0" + zero;
+ }
+
+return zero;
+}
+
+function ExtraStuff(){
+ if(TimeShift){
+ initialDelayID = setTimeout("startTimeshiftBuffering();", 5000);
+ }
+ if(testing2) {
+ if (CAdelayID != -1) { clearTimeout(CAdelayID); CAdelayID = -1; switchtimer.style.opacity = 0;}
+ if ( (currChan > 10 && currChan < 26 ) || (currChan > 40 && currChan < 50 ) || (currChan > 50 && currChan < 120 ) ||
+ (currChan > 151 && currChan < 200) || (currChan > 604 && currChan < 612 ) || (currChan > 624 && currChan < 631) ||
+ (currChan > 632 && currChan < 700) || (currChan > 8004 && currChan < 8027) )
+ {
+ //Show info if set nonfree
+ switchtimer.style.background = "red";
+ switchtimer.innerHTML = "<pre><center>\n" + Lang[90] +"\n\n </center></pre>"; // Non free channel message
+ switchtimer.style.opacity = 1;
+ CAdelayID = setTimeout("switchtimer.style.opacity = 0;",ShowSetTimer);
+ }
+ }
+
+}
+
+function startTimeshiftBuffering() {
+ // check that media player is working
+ if (mediaPlayer.getState() != mediaPlayer.STATE_PLAYING ) {
+ alert("Media Player must be playing when starting timeshift buffering!");
+ return;
+ }
+
+ mediaPlayer.startTimeshiftBuffering(600);
+}
+
+
+function FullScreen() {
+ videoplane.style.width = "100%";
+ videoplane.style.height = "100%";
+ videoplane.style.left = "0px";
+ videoplane.style.top = "0px";
+ if(PipSwitchGuide){
+ if (pipPlayer.getState() != pipPlayer.STATE_IDLE) {
+ pipPlayer.close();
+ }
+ }
+}
+
+
+function onKeyDown(event) {
+//show key info, needed when a 'new' remote is used
+//alert( "keyIdentifier : " + event.keyIdentifier +"\n"+"ctrlKey : " + event.ctrlKey +"\n"+"altKey : " + event.altKey +"\n"+"shiftKey : " + event.shiftKey +"\n"+"RAW : " + event );
+
+ if(isVisible) {
+ onKeyTeletext(event.keyIdentifier);
+ } else if(isSetupMenu) {
+ onKeyMenu(event.keyIdentifier);
+ } else if(isMediaMenu) {
+ onKeyMedia(event.keyIdentifier);
+ } else {
+
+ switch(event.keyIdentifier) {
+
+ case "ChannelUp":
+ case "Up":
+ if(isFullscreen) {
+ count = 0; Change = 0;
+ prevChan = currChan;
+ do
+ {
+ incChan(1);
+ }
+ while (!channels[currChan]);
+ play(channels[currChan]);
+ } else {
+ // swap up <> down in guide mode
+ count = 0; Change = 0;
+ do
+ {
+ decChan(1);
+ }
+ while (!channels[currChan]);
+ preview(channels[currChan]);
+ }
+ break;
+ case "ChannelDown":
+ case "Down":
+ if(isFullscreen) {
+ count = 0; Change = 0;
+ prevChan = currChan;
+ do
+ {
+ decChan(1);
+ }
+ while (!channels[currChan]);
+ play(channels[currChan]);
+ } else {
+ // swap up <> down in guide mode
+ count = 0; Change = 0;
+ do
+ {
+ incChan(1);
+ }
+ while (!channels[currChan]);
+ preview(channels[currChan]);
+ }
+ break;
+ case "Left":
+ count = 0; Change = 0;
+ if(isFullscreen) {
+ defChan[ChanGroup] = currChan;
+ do
+ {
+ do
+ ChanGroup -= 1;
+ while (protChn[ChanGroup] == 1 && ShowProtectedChannels == 1)
+ if (ChanGroup < 0) {
+ ChanGroup = 9;
+ }
+ }
+ while (!minChan[ChanGroup]);
+ currChan = defChan[ChanGroup];
+ play(channels[currChan]);
+ } else {
+ prevChan = currChan;
+ if (currChan > (minChan[ChanGroup] + 8)) {
+ decChan(9);
+ } else {
+ currChan = baseChn[ChanGroup] + (maxChan[ChanGroup] - currChan);
+ }
+ do
+ {
+ decChan(1);
+ }
+ while (!channels[currChan]);
+ preview(channels[currChan]);
+ }
+ break;
+ case "Right":
+ count = 0; Change = 0;
+ if(isFullscreen) {
+ defChan[ChanGroup] = currChan;
+ do
+ {
+ do
+ ChanGroup += 1;
+ while (protChn[ChanGroup] == 1 && ShowProtectedChannels == 1)
+ if (ChanGroup > 9) {
+ ChanGroup = 0;
+ }
+ }
+ while (!minChan[ChanGroup]);
+ currChan = defChan[ChanGroup];
+ play(channels[currChan]);
+
+ } else {
+ prevChan = currChan;
+ if (currChan < (maxChan[ChanGroup] - 9 )) {
+ incChan(9);
+ } else {
+ currChan = baseChn[ChanGroup] + (maxChan[ChanGroup] - currChan);
+ }
+ do
+ {
+ incChan(1);
+ }
+ while (!channels[currChan]);
+ preview(channels[currChan]);
+ }
+ break;
+ case "Red":
+ if(isFullscreen) {
+ if(showClock == 0 ) {
+ showDisplay("", true, 80, 1 );
+ showClock = 1;
+ } else if(showClock == 1 ) {
+ showClock = 0;
+ showDisplay(currChan.toString(), false, 100, 0 );
+ }
+ } else if(isSchedule == 0){
+ if(NowNext) {
+ settimer(EPG[1][2][currChan],EPG[1][1][currChan],0,1,"",(EPG[1][4][currChan] + EPG[1][5][currChan]),EPG[1][6][currChan].toString());
+ }
+ }
+ break;
+ case "Green":
+ if(isFullscreen) {
+ if(!epgactive) {
+ if (audio_dyn < (lang_prio_dyn.length -1)) { audio_dyn += 1} else { audio_dyn = 0 }
+ if (lang_prio_dyn.length > 1) {
+ is.setObject("cfg.media.audio.languagepriority",lang_prio_dyn[audio_dyn] + "," + lang_prio[audio],is.STORAGE_PERMANENT);
+ osdlang.style.opacity = 1;
+ osdlang.innerHTML = "<img src='unmute.png'> " + lang_prio_dyn[audio_dyn] + " ";
+ setTimeout("osdlang.style.opacity = 0; ", 3000);
+ }
+ }
+ } else if(isSchedule == 0 && !epgactive){
+ colorkeys.innerHTML = "<font color=red> " + NN[3 + NowNext] + " </font><font color=green> " + NN[NowNext] + " </font><font color=yellow> " + NN[2] + " </font><font color=blue> " + NN[5] + " </font>";
+ NowNext = 1 - NowNext;
+ showChannelList();
+ }
+
+ if(epgactive) {
+ NowNext = 1 - NowNext;
+ osdepginfo.style.opacity = 1 - osdepginfo.style.opacity ;
+ osdepginfonext.style.opacity = 1 - osdepginfo.style.opacity;
+ }
+
+
+ break;
+ case "Yellow":
+ if(isFullscreen) {
+ if(epgactive) {
+ osdepginfo.style.opacity = 0;
+ osdepginfonext.style.opacity = 0;
+ epgactive = 0;
+ }
+ medialist.style.opacity = 0.9;
+ set_yellow_key = 1;
+ setTimeout("getSchedule(currChan);LoadMediaSettings();",100);
+ } else {
+ GetSchedule(currChan,15);
+ schedule.style.opacity = 1 - schedule.style.opacity;
+ isSchedule = schedule.style.opacity;
+ if(isSchedule == 1){
+ colorkeys.innerHTML = "<font color=red> " + NN[4] + " </font><font color=green> " + NN[4] + " </font><font color=yellow> " + NN[6] + " </font><font color=blue> " + NN[4] + " </font>";
+ } else {
+ colorkeys.innerHTML = "<font color=red> " + NN[3 + (1 - NowNext)] + " </font><font color=green> " + NN[1 - NowNext] + " </font><font color=yellow> " + NN[2] + " </font><font color=blue> " + NN[5] + " </font>";
+ }
+ }
+ break;
+
+ case "Info":
+ case "Blue":
+ case KEY_EPG:
+// if(isFullscreen) {
+// RestartPortal();
+// } else
+ if(isSchedule == 0) {
+ if(!epgactive) {
+ updateOSDtime(currChan);
+ SetOsdInfo();
+ if(isFullscreen) { NowNext = 0;}
+ if (NowNext) {
+ osdepginfo.style.opacity = 0;
+ osdepginfonext.style.opacity = 1;
+ } else {
+ osdepginfo.style.opacity = 1;
+ osdepginfonext.style.opacity = 0;
+ }
+ epgactive = 1;
+ } else {
+ osdepginfo.style.opacity = 0;
+ osdepginfonext.style.opacity = 0;
+ epgactive = 0;
+ }
+// setTimeout("epgactive = 0; osdepginfo.style.opacity = 0; osdepginfonext.style.opacity = 0;", 5000);
+ }
+ break;
+ case "BrowserBack":
+ if(count) {
+ count = 0;
+ osdnr.style.opacity = 0;
+ if(isFullscreen) {
+ showDisplay(currChan.toString(), false, 100, 0 );
+ }
+ Change = 0;
+ } else {
+ if(isSchedule) {
+ isSchedule = 0;
+ schedule.style.opacity = 0;
+ colorkeys.innerHTML = "<font color=red> " + NN[3 + (1 - NowNext)] + " </font><font color=green> "
+ + NN[1 - NowNext] + " </font><font color=yellow> " + NN[2] + " </font><font color=blue> "
+ + NN[5] + " </font>";
+ break;
+ }
+
+ if(isFullscreen) {
+ //SHOW epg info
+ if(!epgactive) {
+// SetOsdInfo();
+// osdepginfo.style.opacity = 1;
+// osdepginfonext.style.opacity = 0;
+// epgactive = 1;
+ } else {
+ osdepginfo.style.opacity = 0;
+ osdepginfonext.style.opacity = 0;
+ epgactive = 0;
+ }
+// setTimeout("epgactive = 0; osdepginfo.style.opacity = 0; osdepginfonext.style.opacity = 0;", 5000);
+ } else if(!isFullscreen){
+ osdepginfo.style.opacity = 0;
+ osdepginfonext.style.opacity = 0;
+ epgactive = 0;
+ isFullscreen = 1;
+ FullScreen();
+ currChan = preChan;
+ ChanGroup = preGrp;
+ }
+ }
+ break;
+
+ case "Enter":
+ // OK key on frontpanel
+ case KEY_OK:
+ if(isFullscreen) {
+ // fullscreen
+ if (osdmain.style.opacity !== 0) {opacity = 0; OSD(opacity);}
+ if(count == 0) {
+ if (osdtimeout) {
+ clearTimeout(osdtimeout);
+ osdtimeout = 0;
+ opacity = 0;
+ OSD(opacity);
+ break;
+ }
+ osdepg.innerHTML = "";
+ showOSD();
+ GetEPG(currChan);
+ updateOSDtime(currChan);
+ osdepg.innerHTML = "<p>" + EPG[0][7][currChan] + "</p>\n<p>" + EPG[1][7][currChan] + "</p>";
+// showOSD();
+ } else {
+ CheckChannel(Change);
+ count = 0;
+ if(ChangeOK) {
+ play(channels[currChan]);
+ ChangeOK = 0;
+ }
+ }
+ } else {
+ // if not fullscreen
+ if(count){
+ CheckChannel(Change);
+ count = 0;
+ if(ChangeOK) {
+ preview(channels[currChan]);
+ ChangeOK = 0;
+ }
+ } else {
+ isFullscreen = 1;
+ FullScreen();
+ if(isSchedule) { isSchedule = 0; schedule.style.opacity = 0; }
+ play(channels[currChan]);
+ }
+ }
+ break;
+
+ case "Menu":
+ if(isFullscreen) {
+ if(count) {
+ count = 0;
+ osdnr.style.opacity = 0;
+ showDisplay(currChan.toString(), false, 100, 0 );
+ Change = 0;
+ }
+ osdepginfo.style.opacity = 0;
+ osdepginfonext.style.opacity = 0;
+ isSetupMenu = 1;
+ mainmenu.style.opacity = 0.8;
+ menu = 0;
+ InitMenu(menu);
+ }
+ break;
+ case KEY_FAV:
+ case "Scroll":
+ if(isFullscreen) {
+ NowNext = 0;
+ videoplane.style.width = (320*Xfactor[Set_Res])+"px";
+ videoplane.style.height = (240*Yfactor[Set_Res])+"px";
+ videoplane.style.left = (380*Xfactor[Set_Res])+"px";
+ videoplane.style.top = (300*Yfactor[Set_Res])+"px";
+ isFullscreen = 0;
+ ClearScreen();
+ channellist.style.opacity = 1;
+ colorkeys.innerHTML = "<font color=red> " + NN[3 + (1 - NowNext)] + " </font><font color=green> " + NN[1 - NowNext] + " </font><font color=yellow> " + NN[2] + " </font><font color=blue> " + NN[5] + " </font>";
+ colorkeys.style.opacity = 1;
+ showChannelList();
+ if(!SwitchGuide) {
+ preChan = currChan;
+ preGrp = ChanGroup;
+ }
+ } else {
+ isSchedule = 0;
+ schedule.style.opacity = 0;
+ isFullscreen = 1;
+ FullScreen();
+ if(!SwitchGuide) {
+ currChan = preChan;
+ ChanGroup = preGrp;
+ }
+ }
+ break;
+ case "TV":
+ case "RADIO":
+ if(isFullscreen) {
+ if(ChanGroup !== 9) {
+ //Radio
+ defChan[ChanGroup] = currChan;
+ ChanGroup = 9;
+ currChan = defChan[9];
+ } else {
+ //TV
+ defChan[ChanGroup] = currChan;
+ ChanGroup = 0;
+ currChan = defChan[0];
+ }
+ isSetupMenu = 0;
+ mainmenu.style.opacity = 0;
+ play(channels[currChan]);
+ }
+ break;
+ case KEY_0:
+ digit = 0;
+ Makedigit();
+ break;
+ case KEY_1:
+ digit = 1;
+ Makedigit();
+ break;
+ case KEY_2:
+ digit = 2;
+ Makedigit();
+ break;
+ case KEY_3:
+ digit = 3;
+ Makedigit();
+ break;
+ case KEY_4:
+ digit = 4;
+ Makedigit();
+ break;
+ case KEY_5:
+ digit = 5;
+ Makedigit();
+ break;
+ case KEY_6:
+ digit = 6;
+ Makedigit();
+ break;
+ case KEY_7:
+ digit = 7;
+ Makedigit();
+ break;
+ case KEY_8:
+ digit = 8;
+ Makedigit();
+ break;
+ case KEY_9:
+ digit = 9;
+ Makedigit();
+ break;
+
+ case KEY_A:// |> key on old long kpn 1710/1760 remote
+ 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]);
+ }
+ break;
+ case KEY_C:// @ key on old long kpn 1710/1760 remote
+ if(isFullscreen && Fav_max_channel !== 0 && ChanGroup !== Fav_group) {
+ timerID = (defChan[Fav_group] - Fav_base - 1); if (timerID < 0) { timerID = 0;}
+ maxTimers = Fav_max_channel;
+ GotoFav(defChan[Fav_group]);
+ } else if(isFullscreen && ChanGroup == Fav_group) {
+ timerID = (currChan - Fav_base - 1);
+ }
+ if(isFullscreen && Fav_max_channel !== 0) {
+ if(count) {
+ count = 0;
+ osdnr.style.opacity = 0;
+ showDisplay(currChan.toString(), false, 100, 0 );
+ Change = 0;
+ }
+ osdepginfo.style.opacity = 0;
+ osdepginfonext.style.opacity = 0;
+ isSetupMenu = 1;
+ mainmenu.style.opacity = 0.8;
+ menu = 10;
+ InitMenu(menu);
+ }
+
+
+ break;
+ case KEY_D:// >@ key on old long kpn 1710/1760 remote
+ if (protChn[ChanGroup] !== 1 && ChanGroup !== Fav_group) {
+ AddtoFav();
+ }
+ break;
+
+ case "Teletext":
+ if(isFullscreen) {
+ ClearScreen();
+ isVisible = 1;
+ setVisible(isVisible);
+ }
+ break;
+ case "VolumeMute":
+ VolumeMute();
+ break;
+ case "VolumeUp":
+ VolumeUp();
+ break;
+ case "VolumeDown":
+ VolumeDown();
+ break;
+
+ case "MediaRewind":
+ if(isFullscreen) {
+ mediaPlayer.play(mediaPlayer.PACE_REWIND);
+ } else {
+ count = 0; Change = 0;
+ defChan[ChanGroup] = currChan;
+ do {
+ do
+ ChanGroup -= 1;
+ while (protChn[ChanGroup] == 1 && ShowProtectedChannels == 1)
+ if (ChanGroup < 0) {
+ ChanGroup = 9;
+ }
+ }
+ while (!minChan[ChanGroup]);
+ currChan = defChan[ChanGroup];
+ preview(channels[currChan]);
+ }
+ break;
+ case "MediaForward":
+ if(isFullscreen) {
+ mediaPlayer.play(mediaPlayer.PACE_FASTFORWARD);
+ } else {
+ count = 0; Change = 0;
+ defChan[ChanGroup] = currChan;
+ do{
+ do
+ ChanGroup += 1;
+ while (protChn[ChanGroup] == 1 && ShowProtectedChannels == 1)
+ if (ChanGroup > 9) {
+ ChanGroup = 0;
+ }
+ }
+ while (!minChan[ChanGroup]);
+ currChan = defChan[ChanGroup];
+ preview(channels[currChan]);
+ }
+ break;
+ case "MediaPlayPause":
+
+ if(isFullscreen && PauseOnServer) {
+ if(mediaPlayer.getState() == mediaPlayer.STATE_PLAYING) {
+ isPause = 1;
+ ServerPause();
+ SetLed(1,1,10);
+// setTimeout("mediaPlayer.play(0);",5000);
+ mediaPlayer.play(0);
+ break;
+ }
+ if(mediaPlayer.getState() == mediaPlayer.STATE_PAUSED || mediaPlayer.getState() == mediaPlayer.STATE_FASTFORWARDING ||
+ mediaPlayer.getState() == mediaPlayer.STATE_REWINDING) {
+ SetLed(1,1,0);
+ mediaPlayer.play(mediaPlayer.PACE_PLAY);
+ break;
+ }
+
+ }
+
+ if(TimeShift){
+ if(mediaPlayer.getState() == mediaPlayer.STATE_PAUSED || mediaPlayer.getState() == mediaPlayer.STATE_FASTFORWARDING || mediaPlayer.getState() == mediaPlayer.STATE_REWINDING) {
+ SetLed(1,1,0);
+ mediaPlayer.play(mediaPlayer.PACE_PLAY);
+ break;
+ }
+ if(mediaPlayer.getState() == mediaPlayer.STATE_PLAYING) {
+ SetLed(1,1,10);
+ mediaPlayer.play(0);
+ break;
+ }
+ }
+ break;
+ case "MediaStop":
+ try {
+ SetLed(1,1,0);
+ if(TimeShift){ mediaPlayer.playFromPosition(mediaPlayer.POSITION_LIVE,mediaPlayer.PACE_PLAY); }
+ } catch(e) {
+ alert(e);
+ }
+ break;
+ case KEY_REC:
+ case KEY_REC2:
+ if(isSchedule == 0) {
+ if(epgactive) {
+ ServerTimer(channels[currChan],EPG[NowNext][6][currChan]);
+ settimer(EPG[NowNext][2][currChan],EPG[NowNext][1][currChan],(EPG[NowNext][3][currChan]*60),2);
+ } else {
+ ServerRecordStart();
+ }
+ }
+// if(isFullscreen && !epgactive) {
+// ServerRecordStart();
+// } else if(isSchedule == 0){
+// if(NowNext) {
+// } else {
+// // make timer for recording
+// ServerTimer(channels[currChan],EPG[NowNext][6][currChan]);
+// settimer(EPG[NowNext][2][currChan],EPG[NowNext][1][currChan],(EPG[NowNext][3][currChan]*60),2);
+// } else {
+// ServerRecordStart();
+// }
+// }
+
+
+ break;
+ case KEY_OPNAMES:
+ case KEY_FILM:
+ case KEY_DVR:
+ if (smartTVplugin) {
+ // jump to recordings menu.
+ if(isFullscreen) {
+ if(count) {
+ count = 0;
+ osdnr.style.opacity = 0;
+ showDisplay(currChan.toString(), false, 100, 0 );
+ Change = 0;
+ }
+ osdepginfo.style.opacity = 0;
+ osdepginfonext.style.opacity = 0;
+ medialist.style.opacity = 0.9;
+ mainmenu.style.opacity = 0;
+ recPath = "/recordings.xml";
+ setTimeout("getRecList();LoadMediaSettings();",100);
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+}
+
+
+function GotoFav(ChanID) {
+ count = 0; Change = 0;
+ prevChan = ""; Fav_key1 = "";
+ defChan[ChanGroup] = currChan;
+ ChanGroup = Fav_group;
+ currChan = ChanID;
+ play(channels[currChan]);
+}
+
+
+function AddtoFav() {
+ Fav_max_channel += 1;
+ maxChan[Fav_group] = Fav_base + Fav_max_channel;
+ channelsnames[(Fav_base + Fav_max_channel)] = channelsnames[currChan];
+ channels[(Fav_base + Fav_max_channel)] = channels[currChan];
+ is.setObject(("vip.channelsnames." + Fav_max_channel),channelsnames[currChan],is.STORAGE_PERMANENT)
+ is.setObject(("vip.channels." + Fav_max_channel),channels[currChan],is.STORAGE_PERMANENT)
+ is.setObject("vip.fav_max_channel",Fav_max_channel.toString(),is.STORAGE_PERMANENT)
+ settimer(0,channels[currChan],Fav_max_channel ,2);
+}
+
+
+function Read_Fav() {
+ Fav_max_channel = Number(is.getObject("vip.fav_max_channel"));
+ maxChan[Fav_group] = Fav_base + Fav_max_channel;
+ for (var i=1; i<=Fav_max_channel; i++) {
+ channelsnames[(i+Fav_base)] = is.getObject(("vip.channelsnames." + i));
+ channels[(i+Fav_base)] = is.getObject(("vip.channels." + i));
+ }
+}
+
+
+function Makedigit() {
+ prevChan = currChan;
+ Change = (Change*10) + digit;
+ count += 1;
+ osdnr.style.opacity = isFullscreen;
+ OSDchannr(Change);
+ if(isFullscreen) {
+ showDisplay((Change.toString()), false, 100, 0 );
+ }
+
+ if (count>channeldigits) {
+ CheckChannel(Change);
+ count = 0;
+ }
+ if(ChangeOK) {
+ if(isFullscreen) {
+ play(channels[currChan]);
+ } else {
+ preview(channels[currChan]);
+ }
+ ChangeOK = 0;
+ }
+}
+
+function CheckChannel(CheckThis) {
+// function to check if channel exists
+ CheckThis = baseChn[ChanGroup] + CheckThis;
+ if(channels[CheckThis]) {
+ ChangeOK = 1;
+ currChan = CheckThis;
+ } else {
+ ChangeOK = 0;
+ }
+ if(prevChan == currChan) {
+ ChangeOK = 0 ;
+ }
+ osdnr.style.opacity = 0;
+ if(isFullscreen) {
+ showDisplay(currChan.toString(), false, 100, 0 );
+ }
+ Change = 0;
+
+}
+
+
+function showDisplay(showtxt,colonState,intensity,currentMode) {
+ if(!showClock){
+ if (Number(showtxt) > 8999 && Number(showtxt) < 10000) { showtxt = "R" + Right(showtxt,3); }
+ if (Number(showtxt) > 9999 && Number(showtxt) < 20000) { showtxt = "F" + Right(showtxt,3); }
+ showtxt = Right(showtxt,4);
+ fps.setSegmentDisplayState(toi.statics.ToiFrontPanelServiceSegmentDisplayState.create(showtxt,colonState,intensity,currentMode));
+ }
+}
+
+
+function SetLed(NumLed,color,blinkfreq){
+ var state = toi.statics.ToiFrontPanelServiceLedState.create(color, blinkfreq);
+ fps.setLedState(NumLed, state);
+}
+
+
+function showOSD() {
+ if (osdtimeout) {
+ clearTimeout(osdtimeout);
+ }
+ SetOsdInfo();
+ opacity = 0.8;
+ OSD(opacity);
+ osdtimeout = setTimeout("fadeOut(); osdtimeout = 0;", ShowOsdTime);
+}
+
+function showVolume() {
+ if (osdVolumetimeout) {
+ clearTimeout(osdVolumetimeout);
+ }
+ osdvolume.innerHTML = Lang[1] + " : " + Volume + "% \uE007" + (new Array(Volume)).join("\uE008") + (new Array(100 - Volume)).join("\uE009") + "\uE00A";
+ osdvolume.style.opacity = 1;
+ osdVolumetimeout = setTimeout("osdvolume.style.opacity = 0;", ShowOsdTime);
+}
+
+
+function OSD(opacity) {
+ osdmain.style.opacity = opacity;
+ osdnr.style.opacity = opacity;
+ osdtime.style.opacity = opacity;
+ osdname.style.opacity = opacity;
+ osdepg.style.opacity = opacity;
+ osdca.style.opacity = opacity;
+ osdtimer.style.opacity = opacity;
+}
+
+
+function SetOsdInfo() {
+ OSDchannr(currChan);
+ date_time();
+ OSDhtml();
+ return;
+}
+
+function onCacheUpdated() {
+ GetEPG(currChan);
+ if (osdtimeout) { SetOsdInfo(); }
+}
+
+function OSDchannr(channr) {
+// Show logo's
+ if (experimental) {
+// osdnr.innerHTML = "<img src='" + channels[currChan] + ".logo.jpg' style='width:80%; max-height:100%; position:absolute; left:10%;' >";
+ }
+ osdnr.innerHTML = "<center>" + Right(channr,3) + "</center>";
+}
+
+function OSDhtml(){
+ osdtime.innerHTML = result;
+ if (ShowSource == 1) {
+ osdname.innerHTML = channels[currChan].split("-")[0] + "\uE003" + Left(channelsnames[currChan],30);
+ } else {
+ osdname.innerHTML = Left(channelsnames[currChan],30);
+ }
+ osdepg.innerHTML = "<p>" + EPG[0][7][currChan] + "</p>\n<p>" + EPG[1][7][currChan] + "</p>";
+ osdepginfo.innerHTML = "<center><p style='" + color_epg_head + ";' >" + currChan + "\uE003" + channelsnames[currChan] + "</p><p style='" + color_epg_avinfo + ";' >" + AvInfo[currChan] + "</p><p style='" + color_epg_title + ";'>" + EPG[0][7][currChan] + EPG[0][9][currChan] + EPG[0][8][currChan] + "</p>\n<p style='" + color_epg_info + ";'>" + EPG[0][4][currChan] + "</p>\n<p>" + Left(EPG[0][5][currChan],750) + "</p></center>";
+ osdepginfonext.innerHTML = "<center><p style='" + color_epg_head + ";'>" + currChan + "\uE003" + channelsnames[currChan] + "</p><p style='" + color_epg_title + ";'>" + EPG[1][7][currChan] + EPG[1][9][currChan] + EPG[1][8][currChan] + "</p>\n<p style='" + color_epg_info + ";'>" + EPG[1][4][currChan] + "</p>\n<p>" + Left(EPG[1][5][currChan],750) + "</p></center>";
+}
+
+function updateOSDtime(timchan) {
+
+ tijd = EPG[0][2][timchan];
+ date = new Date(tijd*1000);
+ tijd = date.toUTCString();
+ tijd = new Date(tijd);
+ dateCurrent = new Date();
+ var EPGminutes = Math.floor((dateCurrent.getTime() - date.getTime()) /1000/60);
+ 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] + " ";
+ if (!EPG[0][2][timchan] || ((EPG[0][3][timchan]-EPGminutes) < 0))
+ {
+ EPG[0][7][timchan] = " ";
+ }
+
+}
+
+
+function settimer(ProgTime,ProgName,ProgDura,SwitchTimer,BackGroundColor,ProgDesc,ProgEvID) {
+
+if (!BackGroundColor) { BackGroundColor = DefaultBGColor;}
+// 1 - switchonly, 2 - record on server (display info only), 3 - record local
+ if(SwitchTimer == 1) {
+ try {
+ var x = ss.schedule("SwitchOnly","notification", ProgTime , ProgDura);
+ ss.setParameter(x, "Channel", currChan.toString() );
+ ss.setParameter(x, "Title", ProgName );
+ ss.setParameter(x, "Info", ProgDesc);
+ ss.setParameter(x, "active", "False");
+ ss.setParameter(x, "Type", "\uE00C"); //Timer Symbol
+ ss.setParameter(x, "resume", "0");
+ ss.setParameter(x, "Eventid", ProgEvID);
+
+ }
+ catch (e) {
+ ProgName = "ERROR" ;
+ BackGroundColor = "red";
+ }
+ } else if(SwitchTimer == 3) {
+ ProgTime -= preRecTime;
+ ProgDura = Number(ProgDura) + (afterRecTime + preRecTime);
+ var y = (new Date().getTime()/1000).toFixed(0);
+ if(ProgTime < y) {
+ ProgDura = ProgDura - (y - ProgTime);
+ ProgTime = y;
+ }
+
+ try {
+ var x = ss.schedule("RecLocal","record_hd_from_ip", ProgTime , ProgDura);
+ if (x != 0) {
+ ss.setParameter(x, "Channel", currChan.toString() );
+ ss.setParameter(x, "Title", ProgName );
+ ss.setParameter(x, "Info", ProgDesc);
+ ss.setParameter(x, "active", "False");
+ ss.setParameter(x, "Type", "\uE00C"); //Timer Symbol
+ ss.setParameter(x, "resume", "0");
+ ss.setParameter(x, "Eventid", ProgEvID);
+ } else {
+ ProgName = "ERROR" ;
+ BackGroundColor = "red";
+ }
+ } catch (e) {
+ alert(e);
+ }
+ }
+
+ if ( ProgTime == 0 && SwitchTimer == 2 && ProgDura !== 0 ) {
+ var x = Lang[3] + ProgDura + "</pre>";
+ } else if ( ProgTime == 0 && SwitchTimer == 2) {
+ var x = "</pre>";
+ } else {
+ tijd = ProgTime;
+ date = new Date(tijd*1000);
+ tijd = date.toUTCString();
+ tijd = new Date(tijd);
+ var tm = tijd.getMinutes();
+ var th = tijd.getHours();
+ th=addzero(th);
+ tm=addzero(tm);
+ var x = Lang[4] + th + ":" + tm + "</pre>";
+ }
+
+ switchtimer.style.background = BackGroundColor;
+ switchtimer.innerHTML = "<pre>" + Lang[2] + Left(ProgName,30) + "\n" + Lang[3] + channelsnames[currChan] + "\n" + x;
+ setOSDtimer();
+
+ switchtimer.style.opacity = 1;
+ setTimeout("switchtimer.style.opacity = 0;", ShowSetTimer);
+
+}
+
+
+function setOSDtimer() {
+ // Only for type "SwitchOnly"
+ var today = new Date;
+ today = today / 1000;
+ var x = ss.getBookingIds("SwitchOnly", today, 0)
+ if (x.length !== 0) {
+ tijd = ss.getNextStartTime("SwitchOnly");
+ date = new Date(tijd*1000);
+ tijd = date.toUTCString();
+ tijd = new Date(tijd);
+ var tm = tijd.getMinutes();
+ var th = tijd.getHours();
+ th=addzero(th);
+ tm=addzero(tm);
+ osdtimer.innerHTML = "<p style='" + color_osdtimer + ";font-size:" + fsList + ";'>" + th + ":" + tm + "</p>";
+ SetLed(0,2,1);
+ switchicon = "\uE00C";
+ osdca.innerHTML = CAicon + switchicon + RECicon;
+ } else {
+ osdtimer.innerHTML = " ";
+ SetLed(0,0,0);
+ switchicon = '\uE003';
+ osdca.innerHTML = CAicon + switchicon + RECicon;
+ }
+}
+
+// Left n characters of str
+function Left(str, n){
+ if (n <= 0)
+ return "";
+ else if (n > String(str).length)
+ return str;
+ else
+ return String(str).substring(0,n);
+}
+
+// Right n characters of str
+function Right(str, n){
+ if (n <= 0)
+ return "";
+ else if (n > String(str).length)
+ return str;
+ else {
+ var iLen = String(str).length;
+ return String(str).substring(iLen, iLen - n);
+ }
+}
+
+function fadeIn() {
+ opacity += 0.2;
+ OSD(opcity);
+ if (opacity >= 1) {
+ setTimeout("fadeOut()", 200);
+ return;
+ }
+ setTimeout("fadeIn()", 100);
+}
+
+function fadeOut() {
+ opacity -= 0.5;
+ OSD(opacity);
+ if (opacity <= 0) {
+ return;
+ }
+ setTimeout("fadeOut()", 100);
+}
+
+function RestartPortal(){
+
+ try {
+ ids = toi.applicationService.getApplicationIds();
+ for ( i = 0; i < ids.length; ++i ){
+ info = toi.applicationService.getInfo(ids[i]);
+ if (info.applicationName == "WebKit Portal"){
+ dump("Killing app " + ids[i] + ": " + info.applicationName);
+ toi.applicationService.kill(ids[i]);
+ }
+ }
+ }
+ catch(e) { dump(e) };
+}
+
+function date_time()
+{
+ date = new Date;
+ year = date.getFullYear();
+ month = date.getMonth();
+ d = date.getDate();
+ day = date.getDay();
+ h = date.getHours();
+ m = date.getMinutes();
+ h=addzero(h);
+ m=addzero(m);
+ result = ''+days[day]+' '+d+' '+months[month]+' '+year+' '+h+':'+m;
+ return;
+}
+
+function date_time_rec()
+{
+ date = new Date(Number(recStrt[currMed])*1000);
+ year = date.getFullYear();
+ month = date.getMonth();
+ month = addzero(month + 1);
+ d = date.getDate();
+ d = addzero(d);
+ day = date.getDay();
+ h = date.getHours();
+ m = date.getMinutes();
+ h = addzero(h);
+ m = addzero(m);
+ if (year!==1970) {
+ result = ' ' + d + '-' + month + '-' + year + ' ' + h + ':' + m;
+ } else {
+ result = "";
+ }
+ return;
+}
+
+// EPG Section
+
+function GetEPG(epgchan)
+{
+ EPG[0][7][epgchan] = "";
+ EPGShortnow = "";
+ EPGExtnow = "";
+ EPG[1][7][epgchan] = "";
+ EPGShortnext = "";
+ EPGExtnext = "";
+ SI="";
+ try {
+
+ eitCache.clearServices();
+
+ StreamInfo(epgchan);
+
+ eitService = toi.statics.ToiDvbEitCacheServiceItem.create(SI[1],SI[2],SI[3]);
+ eitCache.addService(eitService);
+ event = eitCache.getPresentEvent(eitService);
+ if(event.freeCaMode){
+ CAicon = "\uE00D";
+ } else {
+ CAicon = Radioicon;
+ }
+
+ osdca.innerHTML = CAicon + switchicon + RECicon;
+
+ if (event.name) {
+ events = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000);
+ extEventsnow = eitCache.getExtendedEventInfo(eitService, events.infoSequence[0].eventId);
+ EPGShortnow = extEventsnow.shortInfo;
+ EPGExtnow = extEventsnow.extendedInfo;
+ Extok = 1;
+
+ } else { Extok = 0; }
+
+
+
+ EPG[0][1][epgchan] = event.name;
+ EPG[0][2][epgchan] = event.time;
+ EPG[0][3][epgchan] = (event.duration/60);
+// EPG[0][4][epgchan] = "";
+// EPG[0][5][epgchan] = "";
+ EPG[0][6][epgchan] = event.eventId;
+ if (event.parentalRating) {
+ EPG[0][8][epgchan] = "<br>(" + Lang[5] + (event.parentalRating + 3) + " )";
+ } else {
+ EPG[0][8][epgchan] = "";
+ }
+
+ if (event.contentNibbles) {
+ connib = event.contentNibbles;
+ Nibbles();
+ EPG[0][9][epgchan] = "<br>" + content;
+ } else {
+ EPG[0][9][epgchan] = "";
+ }
+
+
+ if(EPGShortnow) {
+ EPG[0][4][epgchan] = EPGShortnow;
+ } else {
+ EPG[0][4][epgchan] = "";
+ }
+ if(EPGExtnow) {
+ EPG[0][5][epgchan] = EPGExtnow;
+ } else {
+ EPG[0][5][epgchan] = "";
+ }
+
+ if (EPG[0][5][epgchan] == EPG[0][4][epgchan]) { EPG[0][5][epgchan] = "";}
+
+
+
+ updateOSDtime(epgchan);
+
+ event = eitCache.getFollowingEvent(eitService);
+ if (Extok) {
+ for (var i = 0; i < events.infoSequence.length && i < 4; i++) {
+ extEvents = eitCache.getExtendedEventInfo(eitService, events.infoSequence[i].eventId);
+ if (extEvents.eventId == event.eventId) {
+ EPGShortnext = extEvents.shortInfo;
+ EPGExtnext = extEvents.extendedInfo;
+ }
+ }
+ }
+
+ EPG[1][1][epgchan] = event.name;
+ EPG[1][2][epgchan] = event.time;
+ EPG[1][3][epgchan] = (event.duration/60);
+// EPG[1][4][epgchan] = "";
+// EPG[1][5][epgchan] = "";
+ EPG[1][6][epgchan] = event.eventId;
+ if (event.parentalRating) {
+ EPG[1][8][epgchan] = "<br>(" + Lang[5] + (event.parentalRating + 3) + " )";
+ } else {
+ EPG[1][8][epgchan] = "";
+ }
+
+ if (event.contentNibbles) {
+ connib = event.contentNibbles;
+ Nibbles();
+ EPG[1][9][epgchan] = "<br>" + content;
+ } else {
+ EPG[1][9][epgchan] = "";
+ }
+
+ if(EPGShortnext) {
+ EPG[1][4][epgchan] = EPGShortnext;
+ } else {
+ EPG[1][4][epgchan] = "";
+ }
+ if(EPGExtnext) {
+ EPG[1][5][epgchan] = EPGExtnext;
+ } else {
+ EPG[1][5][epgchan] = "";
+ }
+
+ if (EPG[1][5][epgchan] == EPG[1][4][epgchan]) { EPG[1][5][epgchan] = "";}
+
+ tijd = event.time;
+ date = new Date(tijd*1000);
+ tijd = date.toUTCString();
+ tijd = new Date(tijd);
+ var tm = tijd.getMinutes();
+ var th = tijd.getHours();
+ th=addzero(th);
+ tm=addzero(tm);
+ EPG[1][7][epgchan] = th + ":" + tm + " (" + (event.duration/60).toFixed(0) + ")" + " " + event.name + " ";
+
+ if (!event.time)
+ {
+ EPG[1][7][epgchan] = " ";
+ }
+
+
+ } catch(e) {
+ alert("Get EPG problem: " + e);
+ CAicon = "\uE01A";
+ }
+}
+
+
+function Nibbles() {
+ content = "";
+ if (connib >= 0x00001000 && connib < 0x00002000) { content = CLang[0]; }
+ if (connib >= 0x00002000 && connib < 0x00003000) { content = CLang[10]; }
+ if (connib >= 0x00003000 && connib < 0x00004000) { content = CLang[20]; }
+ if (connib >= 0x00004000 && connib < 0x00005000) { content = CLang[30]; }
+ if (connib >= 0x00005000 && connib < 0x00006000) { content = CLang[40]; }
+ if (connib >= 0x00006000 && connib < 0x00007000) { content = CLang[50]; }
+ if (connib >= 0x00007000 && connib < 0x00008000) { content = CLang[60]; }
+ if (connib >= 0x00008000 && connib < 0x00009000) { content = CLang[70]; }
+ if (connib >= 0x00009000 && connib < 0x0000A000) { content = CLang[80]; }
+ if (connib >= 0x0000A000 && connib < 0x0000B000) { content = CLang[90]; }
+ if (connib >= 0x0000B000 && connib < 0x0000C000) { content = CLang[100]; }
+ // alert(connib);
+}
+
+
+function GetSchedule(schchan,tablelength){
+ //Old style Schedule, used in Guide View.
+ SI = "";
+ try {
+ StreamInfo(schchan);
+
+ eitService = toi.statics.ToiDvbEitCacheServiceItem.create(SI[1],SI[2],SI[3]);
+ eitCache.addService(eitService);
+ event = eitCache.getPresentEvent(eitService);
+ events = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000);
+
+ if (event.name) {
+ if (events.more) {
+ var t = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000);
+ events.infoSequence.concat(t.infoSequence);
+ events.more = t.more;
+ }
+
+ var txt = "<table><tr>";
+ var i = 0;
+ for (i = 0; i < events.infoSequence.length && i < tablelength; i++) {
+
+ while ((i > 0) && (events.infoSequence[i].eventId == events.infoSequence[(i-1)].eventId)) {
+ i = i + 1;
+ }
+
+ tijd = events.infoSequence[i].time;
+ date = new Date(tijd*1000);
+ tijd = date.toUTCString();
+ tijd = new Date(tijd);
+ var tm = tijd.getMinutes();
+ var th = tijd.getHours();
+ th=addzero(th);
+ tm=addzero(tm);
+
+ txt = txt + "<td style='font-size:" + fsSchedList + ";" + color_sched_font + ";'>\uE003\uE003\uE003\uE003\uE003" + th + ":" + tm + " (" + (events.infoSequence[i].duration/60).toFixed(0) + ") " + Left(events.infoSequence[i].name,30) + "</td></tr>";
+ }
+ txt = txt + "</table>";
+ schedule.innerHTML = "<p style='" + color_sched_head + ";font-size:" + fsSched + ";'>" + "\uE003" + schchan + "\uE003" + channelsnames[schchan] + txt + "</p>";
+ } else {
+ schedule.innerHTML = "<p style='" + color_sched_head + ";font-size:" + fsSched + ";'>" + "\uE003" + schchan + "\uE003" + channelsnames[schchan] + "</p>";
+ }
+
+ } catch(e) {
+ alert("Get EPG problem: " + e);
+ schedule.innerHTML = "<p style='" + color_sched_head + ";font-size:" + fsSched + ";'>" + "\uE003" + schchan + "\uE003" + channelsnames[schchan] + "</p><p>" + Lang[6] + "</p>";
+ }
+
+}
+
+
+function StreamInfo(si) {
+ // EPG Filter
+ // streaminfo
+ // SI[x] 0-sat,1-NID,2-TID,3-SID
+ SI=channels[si].split("-");
+
+ //default setting : English
+ is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
+
+ if(SI[0]=="C") {
+ // Default on Cable - Dutch // Ziggo.
+ is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="T") {
+ // DVB-T default German.
+ is.setObject("cfg.locale.ui","ger",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="8720") {
+ // KPN DVB-T (might also be used for some german)
+ is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S19.2E") {
+ // Default on 19E German.
+ is.setObject("cfg.locale.ui","ger",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S28.2E") {
+ // Default on 28E English
+ is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S42.0E") {
+ is.setObject("cfg.locale.ui","tur",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S42.0E" && SI[3]=="3601") {
+ is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="133") {
+ //sky deutchland
+ is.setObject("cfg.locale.ui","DEU",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[2]=="1107") {
+ //Sat1/pro7 deutchland
+ is.setObject("cfg.locale.ui","DEU",is.STORAGE_VOLATILE);
+ }
+
+// if(SI[2]=="1057") {
+// //RTL HD transponder
+// is.setObject("cfg.locale.ui","GER",is.STORAGE_VOLATILE);
+// }
+
+// if(SI[2]=="1057" && SI[3]=="61204") {
+// //Sport1 HD (daytime only?)
+// is.setObject("cfg.locale.ui","DEU",is.STORAGE_VOLATILE);
+// }
+
+ if(SI[2]=="1055" || SI[2]=="1053" || SI[2]=="1041" || SI[2]=="1017" || SI[2]=="1109") {
+ //HD+ transponder
+ is.setObject("cfg.locale.ui","DEU",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S13.0E" && (SI[2]=="1600" || SI[2]=="1000" || SI[2]=="1500" || SI[2]=="1300" || SI[2]=="300" || SI[2]=="1100" )) {
+ //NC+ (Polish)
+ is.setObject("cfg.locale.ui","pol",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S13.0E" && (SI[2]=="11200" || SI[2]=="400" || SI[2]=="12000" || SI[2]=="11400" || SI[2]=="11900" || SI[2]=="11600" )) {
+ //NC+ (Polish)
+ is.setObject("cfg.locale.ui","pol",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S13.0E" && (SI[2]=="11000" || SI[2]=="1400")) {
+ //NC+ (Polish)
+ is.setObject("cfg.locale.ui","pol",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="113") {
+ //PolSat
+ is.setObject("cfg.locale.ui","pol",is.STORAGE_VOLATILE);
+ }
+
+ if((SI[0]=="S19.2E" && SI[2]=="1059") ) {
+ //TVP transponder
+ is.setObject("cfg.locale.ui","pol",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="64511") {
+ //sky Italia
+ is.setObject("cfg.locale.ui","ita",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S13.0E" && (SI[2]=="5400" || SI[2]=="12400" || SI[2]=="65419" || SI[2]=="65417" )) {
+ //Rai Italia
+ is.setObject("cfg.locale.ui","ita",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="53" ) {
+ //Canal Digitaal/ TV Vlaanderen
+ is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S19.2E" && SI[2]=="1048" && SI[3]=="4320" ) {
+ //BVN
+ is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
+ }
+
+
+ if(SI[1]=="54") {
+ //ZON / 30W
+ is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="83") {
+ //MEO / 30W
+ is.setObject("cfg.locale.ui","por",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="49") {
+ //Digital 30W
+ is.setObject("cfg.locale.ui","spa",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="3" && ( SI[2]=="3202" || SI[2]=="3208" || SI[2]=="3211" || SI[2]=="3222" || SI[2]=="3225") ) {
+ //Canal Digitaal/ TV Vlaanderen (NID:3 is used for more than only CDS/TVV on 23East)
+ is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="3" && SI[2]=="3208" && SI[3]=="7037") {
+ // Some other EPG
+ is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="3" && ( SI[2]=="3217") ) {
+ // 23E - Deluxe HD
+ is.setObject("cfg.locale.ui","DEU",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="3" && SI[2]=="3212" && ( SI[3]=="14052" || SI[3]=="14055" ) ) {
+ is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="3" && ( SI[2]=="3205" || SI[2]=="3209" || SI[2]=="3210" || SI[2]=="3221" || SI[2]=="3219" || SI[2]=="3226")) {
+ //Canal Digitaal/ TV Vlaanderen use CZE channels on 23East
+ // Strangly set filter to cze but epg is in Dutch. (But not for JimJam)
+ is.setObject("cfg.locale.ui","cze",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[1]=="3" && SI[2]=="3211" && ( SI[3]=="20863" || SI[3]=="20865") ) {
+ //MGM & Film+ CZ
+ is.setObject("cfg.locale.ui","cze",is.STORAGE_VOLATILE);
+ }
+
+ if((SI[0]=="S13.0E" && SI[3]=="14003") || (SI[0]=="S13.0E" && SI[3]=="14009") || (SI[0]=="S13.0E" && SI[3]=="14051") || (SI[0]=="S13.0E" && SI[3]=="951")) {
+ //Swiss ITA channels
+ is.setObject("cfg.locale.ui","ita",is.STORAGE_VOLATILE);
+ }
+
+ if((SI[0]=="S13.0E" && SI[2]=="12800")) {
+ is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
+ }
+
+ if((SI[0]=="S13.0E" && SI[3]=="14002") || (SI[0]=="S13.0E" && SI[3]=="14008") || (SI[0]=="S13.0E" && SI[3]=="17203") || (SI[0]=="S13.0E" && SI[3]=="17204") ) {
+ //Swiss FRA channels
+ is.setObject("cfg.locale.ui","fra",is.STORAGE_VOLATILE);
+ }
+
+ if((SI[0]=="S13.0E" && SI[3]=="17201") || (SI[0]=="S13.0E" && SI[3]=="17202") || (SI[0]=="S13.0E" && SI[3]=="901") || (SI[0]=="S13.0E" && SI[3]=="907") || (SI[0]=="S13.0E" && SI[3]=="911") ) {
+ //Swiss GER channels
+ is.setObject("cfg.locale.ui","ger",is.STORAGE_VOLATILE);
+ }
+
+ if((SI[0]=="S19.2E" && SI[2]=="1111" && SI[3]=="7290") ) {
+ //Sky News on WDR HD transponder
+ is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S19.2E" && ( (SI[2]=="1018") || (SI[2]=="1020") || (SI[2]=="1022") || (SI[2]=="1024") || (SI[2]=="1026") || (SI[2]=="1068") || (SI[2]=="1070") || (SI[2]=="1072") || (SI[2]=="1074") || (SI[2]=="1076") || (SI[2]=="1080") || (SI[2]=="1084") || (SI[2]=="1086") || (SI[2]=="1090") || (SI[2]=="1092") || (SI[2]=="1094") || (SI[2]=="1096") || (SI[2]=="1100") || (SI[2]=="1102") || (SI[2]=="1106") || (SI[2]=="1110") || (SI[2]=="1112") || (SI[2]=="1114") || (SI[2]=="1116") || (SI[2]=="1118") || (SI[2]=="1120"))) {
+ //CanalSat S19.2
+ is.setObject("cfg.locale.ui","fra",is.STORAGE_VOLATILE);
+ }
+
+ // MTV transponder 1078 / 1066
+ if(SI[0]=="S19.2E" && SI[2]=="1078" && ( SI[3]=="28674" || SI[3]=="28675" || SI[3]=="28677" )) {
+ //Nick JR France
+ is.setObject("cfg.locale.ui","fra",is.STORAGE_VOLATILE);
+ }
+ if(SI[0]=="S19.2E" && SI[2]=="1078" && SI[3]=="28679") {
+ //Nick NL
+ is.setObject("cfg.locale.ui","dut",is.STORAGE_VOLATILE);
+ }
+ if(SI[0]=="S19.2E" && SI[2]=="1078" && ( SI[3]=="28673" || SI[3]=="28676" )) {
+ //Deutsch
+ is.setObject("cfg.locale.ui","ger",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S19.2E" && SI[2]=="1066") {
+ is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
+ }
+ if(SI[0]=="S19.2E" && SI[2]=="1066" && ( SI[3]=="28652" || SI[3]=="28661" )) {
+ is.setObject("cfg.locale.ui","fra",is.STORAGE_VOLATILE);
+ }
+
+ //Canal Sat
+ if(SI[0]=="S19.2E" && SI[1]=="1" && SI[2]=="1088" ) {
+ is.setObject("cfg.locale.ui","fre",is.STORAGE_VOLATILE);
+ }
+
+ if(SI[0]=="S13.0E" && SI[1]=="319") {
+ is.setObject("cfg.locale.ui","fre",is.STORAGE_VOLATILE);
+ }
+
+ //Euronews / Eurosport
+ if(SI[0]=="S13.0E" && SI[1]=="318" && SI[2]=="200") {
+ is.setObject("cfg.locale.ui","fra",is.STORAGE_VOLATILE);
+ }
+
+ //bloomberg 19.2E
+ if(SI[0]=="S19.2E" && SI[2]=="1026" && SI[3]=="10067") {
+ is.setObject("cfg.locale.ui","eng",is.STORAGE_VOLATILE);
+ }
+
+ //Canal+
+ if(SI[0]=="S19.2E" && SI[1]=="1" && SI[2]=="1060" ) {
+ is.setObject("cfg.locale.ui","spa",is.STORAGE_VOLATILE);
+ }
+
+ //Russian
+ if(SI[0]=="S13.0E" && SI[2]=="8100") {
+ is.setObject("cfg.locale.ui","ger",is.STORAGE_VOLATILE);
+ //doesn't work but dvbsnoop does show 'ISO639_2_language_code: ger'
+ }
+
+
+}
+
+
+// End of EPG section
+
+
+
+// Channelslist / EPG Guide
+//
+// show currchan - 5
+// highlite currchan
+// show currchan + 5
+//
+// check if chan is OK
+//
+function showChannelList() {
+ var liststyle = "";
+ var htmlstring = "<table border='0'><tr>";
+ listChan = currChan-5;
+ for(var i=currChan-5; i<=currChan+5; i++) {
+ do
+ {
+ listChan += 1;
+ if (listChan<minChan[ChanGroup]) {
+ listChan=maxChan[ChanGroup];
+ }
+ if (listChan>maxChan[ChanGroup]) {
+ listChan=minChan[ChanGroup];
+ }
+ }
+
+ while (!channels[listChan] && (listChan<maxChan[ChanGroup]));
+ if (fullupdate) { GetEPG(listChan); }
+ if ( listChan == currChan) {
+ if (!fullupdate) { GetEPG(listChan); }
+ liststyle = "background:" + color_bg + ";";
+ } else {
+ liststyle = "";
+ }
+ EpgInfo[0] = EPG[0][7][listChan];
+ EpgInfo[1] = EPG[1][7][listChan];
+ htmlstring = htmlstring + "<td style='" + liststyle + "font-size:" + fsList + ";'>\uE003\uE003" + listChan + "\uE003</td><td style='" + liststyle + "font-size:" + fsList + ";'>" + Left(channelsnames[listChan],15) + "\uE003</td><td style='" + liststyle + "font-size:" + fsList + ";'>" + Left(EpgInfo[NowNext],64) + "</td></tr>";
+ }
+ htmlstring = htmlstring + "</table>";
+ channellist.innerHTML = htmlstring;
+ chanlistepg.innerHTML = "<center><p style='" + color_chan_epg + ";font-size:" + fsEpg + ";'>" + EPG[NowNext][1][currChan] + "</p><p style='" + color_chan_epg + ";font-size:" + fsList + ";'>" + Left(EPG[NowNext][4][currChan],250) + "</p></center>" ;
+
+}
+
+
+// END of Channelslist / EPG Guide
+
+// TeleTXT section
+
+function embedTeletextPlugin() {
+ teletext = document.createElement("embed");
+ teletext.id = "teletext";
+ teletext.type = "application/motorola-teletext-plugin";
+ teletext.style.position = "absolute";
+ teletext.style.width = "100%";
+ teletext.style.height = "100%";
+ teletext.style.top = "10px"; // has to be 1 rather than 0
+ teletext.style.left = "10px"; // has to be 1 rather than 0
+ teletext.style.zIndex = "501";
+ return teletext;
+}
+
+
+function setVisible(isVisible) {
+ if (isVisible) {
+ videoplane.style.width = "50%";
+ videoplane.style.left = "50%";
+ document.body.appendChild(teletext);
+ teletext.style.width = "50%";
+ teletext.style.visibility = "visible";
+ channellist.style.visibility = "hidden";
+ colorkeys.style.visibility = "hidden";
+ } else {
+ teletext.style.visibility = "hidden";
+ channellist.style.visibility = "visible";
+ colorkeys.style.visibility = "visible";
+ }
+}
+
+
+function onKeyTeletext(keyCode) {
+ switch(keyCode) {
+ case "Left":
+ teletext.api.gotoNextPage();
+ break;
+ case "Right":
+ teletext.api.gotoPreviousPage();
+ break;
+ case "Red":
+ teletext.api.inputRedKey();
+ break;
+ case "Green":
+ teletext.api.inputGreenKey();
+ break;
+ case "Yellow":
+ teletext.api.inputYellowKey();
+ break;
+ case "Blue":
+ teletext.api.inputCyanKey();
+ break;
+ case "MediaRewind":
+ teletext.api.gotoPreviousSubpage();
+ break;
+ case "MediaForward":
+ teletext.api.gotoNextSubpage();
+ break;
+ case "MediaStop":
+ teletext.style.width = "100%";
+ teletext.api.transparent = !teletext.api.transparent;
+ FullScreen();
+ break;
+ case "BrowserBack":
+ case "Teletext":
+ isVisible = 0;
+ FullScreen();
+ setVisible(isVisible);
+ break;
+
+ case "TV":
+ teletext.api.gotoIndexPage();
+ break;
+
+ case KEY_0:
+ teletext.api.inputDigit(0);
+ break;
+ case KEY_1:
+ teletext.api.inputDigit(1);
+ break;
+ case KEY_2:
+ teletext.api.inputDigit(2);
+ break;
+ case KEY_3:
+ teletext.api.inputDigit(3);
+ break;
+ case KEY_4:
+ teletext.api.inputDigit(4);
+ break;
+ case KEY_5:
+ teletext.api.inputDigit(5);
+ break;
+ case KEY_6:
+ teletext.api.inputDigit(6);
+ break;
+ case KEY_7:
+ teletext.api.inputDigit(7);
+ break;
+ case KEY_8:
+ teletext.api.inputDigit(8);
+ break;
+ case KEY_9:
+ teletext.api.inputDigit(9);
+ break;
+
+
+
+ }
+}
+
+// end of TeleTXT section
+
+
+// Menu section
+
+function onKeyMenu(keyCode) {
+ switch(keyCode) {
+ case "BrowserBack":
+ if ((menu == 5 || menu == 7) && osdepginfo.style.opacity == 1) {
+ osdepginfo.style.opacity = 0;
+ } else if (menu == 10 || menu == MainMenu) {
+ isSetupMenu = 0;
+ mainmenu.style.opacity = 0;
+ osdepginfo.style.opacity = 0;
+ } else if (menu !== MainMenu) {
+ if (menu == 3 ) { isFullscreen = 0; play(channels[currChan]); isFullscreen = 1;MPDListener = 0;}
+ menu = MainMenu;
+ InitMenu(menu);
+ }
+ break;
+ case "Menu":
+ if (menu == 3 ) { play(channels[currChan]);MPDListener = 0;}
+ isSetupMenu = 0;
+ mainmenu.style.opacity = 0;
+ osdepginfo.style.opacity = 0;
+ break;
+
+ case "Left":
+ break;
+ case "Right":
+ break;
+ case "Up":
+ if (menu == 2) {
+ timerID -= 1;
+ if (timerID < 1) { timerID = 1; }
+ } else if (menu == 5 || menu == 7 || menu == 10) {
+ timerID -= 1;
+ if (timerID < 0) { timerID = 0; }
+ }
+ InitMenu(menu);
+ break;
+ case "Down":
+ if (menu == 2) {
+ timerID += 1;
+ var x = ss.getBookingIds("*", 0, 0);
+ if (timerID > x.length ) { timerID = x.length; }
+ } else if (menu == 5 || menu == 7 || menu == 10) {
+ timerID += 1;
+ if (timerID > (maxTimers - 1) && maxTimers !== 0) { timerID = maxTimers - 1; }
+ }
+ InitMenu(menu);
+ break;
+ case KEY_OK:
+ if (menu == 2 && isMediaMenu !== 1) {
+ var x = ss.getBookingIds("*", 0, 0);
+ try {
+ recLink[0] = ss.getParameter(x[timerID-1], "assetURI");
+ recGUID[0] = ss.getParameter(x[timerID-1], "assetId");
+ recChan[0] = ss.getParameter(x[timerID-1], "Channel");
+ recTitl[0] = ss.getParameter(x[timerID-1], "Title");
+ recDura[0] = ss.getBooking(x[timerID-1]).duration;// Is updated if real length is different
+ recStrt[0] = ss.getBooking(x[timerID-1]).start;
+ recDesc[0] = ss.getParameter(x[timerID-1], "Info");
+ recDummy[0] = x[timerID-1];
+ resume_position = Number(ss.getParameter(x[timerID-1], "resume"));
+ localRecording = 1;
+ currMed = 0;
+ getRecOK = 0;
+ LoadMediaSettings();
+ isSetupMenu = 0;
+ medialist.style.opacity = 0;
+ mainmenu.style.opacity = 0;
+ playRec(recLink[0],resume_position);
+ } catch(e) {
+ alert("error : " + e);
+ }
+ }
+ if (menu == 10) {
+ GotoFav((timerID + Fav_base + 1));
+ isSetupMenu = 0;
+ mainmenu.style.opacity = 0;
+ osdepginfo.style.opacity = 0;
+ }
+ if (menu == 5) {
+ // Show EPG info Timer
+ osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
+ osdepginfo.innerHTML = "<center><pre style='" + color_timerinfo + ";'>\n\n\n" + Lang[0] + "\n\n\n </pre></center>" ;
+ setTimeout("ShowTimerInfo();",100);
+ }
+ if (menu == 7) {
+ // Show more info Current SearchTimer
+ osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
+ osdepginfo.innerHTML = "<center><pre style='" + color_main_head + ";'>" + searchtimersSearch[timerID] + "\n\n\n\n<center>" + Lang[0] + "</center></pre>" ;
+ setTimeout("ShowSearchTimerInfo();",100);
+ }
+
+ break;
+ case "Red":
+ if (menu == 1) {
+ if (subs_dyn < (subs_prio_dyn.length -1)) { subs_dyn += 1} else { subs_dyn = 0 }
+ if (subs_prio_dyn.length > 0) {
+ is.setObject("cfg.media.subtitling.languagepriority", (subs_prio_dyn[subs_dyn] + "," + subs_prio),is.STORAGE_PERMANENT);
+ } else {
+ is.setObject("cfg.media.subtitling.languagepriority",subs_prio,is.STORAGE_PERMANENT);
+ }
+ InitMenu(menu);
+ break;
+ } else if (menu == 2) {
+ var x = ss.getBookingIds("*", 0, 0);
+ if (x.length > 0) {
+ if (mediaRecorder) {
+ try {
+ if (ss.getParameter(x[timerID-1], "active") == "True") {
+ ss.setParameter(x[timerID-1], "active", "False");
+ mediaRecorder.close();
+ }
+ } catch (e) {
+ alert(e);
+ }
+
+ try {
+ ams.removeAsset(rma, ss.getParameter(x[timerID-1], "assetId"));
+ } catch(e) {
+ alert("Error remove asset" + e);
+ }
+ }
+
+ //Remove timer from schedule DB
+
+ ss.remove(x[timerID-1]);
+ timer[timerID] = "";
+ timerID -= 1; if (timerID < 1) { timerID = 1;}
+ LoadTimers();
+ //if (timer.length !== 0) { do { timerID = timerID + 1; } while (!timer[timerID] && (timerID < timer.length)) }
+ setOSDtimer();
+ InitMenu(menu);
+ }
+ } else if (menu == 5 && smartTVplugin) {
+ osdepginfo.style.opacity = 0;
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n\n\n<center>" + Lang[0] + "</center></pre>";
+ DeleteTimers();
+ setTimeout("LoadTimersServer();InitMenu(menu);",100);
+ } else if (menu == 10) {
+ channels[(timerID + Fav_base + 1)]="";
+ channelsnames[(timerID + Fav_base + 1)]="";
+ is.setObject(("vip.channelsnames." + (timerID + 1)),"",is.STORAGE_PERMANENT)
+ is.setObject(("vip.channels." + (timerID + 1)),"",is.STORAGE_PERMANENT)
+ if (Fav_max_channel == (timerID + 1)) {
+ Fav_max_channel = timerID;
+ maxTimers = Fav_max_channel;
+ is.setObject("vip.fav_max_channel",Fav_max_channel.toString(),is.STORAGE_PERMANENT)
+ timerID -= 1; if (timerID < 0) {timerID = 0;}
+ }
+ setTimeout("InitMenu(menu);",100);
+ }
+ break;
+ case "Green":
+ if (menu == 1) {
+ Set_Res = Set_Res + 1;
+ if (Set_Res > (VideoOutputModes.length-1)) { Set_Res = 0;}
+ // save the info
+ is.setObject("vip.resolution",Set_Res.toString(),is.STORAGE_PERMANENT)
+
+ VideoOutput();
+ InitMenu(menu);
+ } else if (menu == 2 && mediaRecorder) {
+ var x = ss.getBookingIds("*", 0, 0);
+ if (ss.getBooking(x[timerID-1]).category == "RecLocal") {
+ ss.reschedule(x[timerID-1],"SwitchOnly","notification",ss.getBooking(x[timerID-1]).start,ss.getBooking(x[timerID-1]).duration)
+ } else if (ss.getBooking(x[timerID-1]).category == "SwitchOnly") {
+ ss.reschedule(x[timerID-1],"RecLocal","record_hd_from_ip",ss.getBooking(x[timerID-1]).start,ss.getBooking(x[timerID-1]).duration)
+ }
+ LoadTimers();
+ InitMenu(menu);
+ } else if (menu == 5 && smartTVplugin) {
+ activate_timers(timerID);
+ InitMenu(menu);
+ } else if (menu == 10) {
+ //move up
+ if (timerID !== 0) {
+ x = timerID + Fav_base + 1;
+ x1 = channels[x];
+ y1 = channelsnames[x];
+ x2 = channels[(x - 1)];
+ y2 = channelsnames[(x - 1)];
+ is.setObject(("vip.channelsnames." + (timerID + 1)),y2,is.STORAGE_PERMANENT)
+ is.setObject(("vip.channels." + (timerID + 1)),x2,is.STORAGE_PERMANENT)
+ is.setObject(("vip.channelsnames." + timerID),y1,is.STORAGE_PERMANENT)
+ is.setObject(("vip.channels." + timerID),x1,is.STORAGE_PERMANENT)
+ channelsnames[x] = y2;
+ channels[x] = x2;
+ channelsnames[(x - 1)] = y1;
+ channels[(x - 1)] = x1;
+ timerID -= 1;
+ setTimeout("InitMenu(menu);",100);
+ }
+ }
+ break;
+ case "Yellow":
+ if (menu == MainMenu) {
+ menu = 4; // INFO menu
+ InitMenu(menu);
+ } else if (menu == 1) {
+ menu = 9; // INFO2 menu
+ InitMenu(menu);
+ } else if (menu == 10) {
+ //move down
+ if (timerID !== (maxTimers - 1)) {
+ x = timerID + Fav_base + 1;
+ x1 = channels[x];
+ y1 = channelsnames[x];
+ x2 = channels[(x + 1)];
+ y2 = channelsnames[(x + 1)];
+ is.setObject(("vip.channelsnames." + (timerID + 1)),y2,is.STORAGE_PERMANENT)
+ is.setObject(("vip.channels." + (timerID + 1)),x2,is.STORAGE_PERMANENT)
+ is.setObject(("vip.channelsnames." + (timerID + 2)),y1,is.STORAGE_PERMANENT)
+ is.setObject(("vip.channels." + (timerID + 2)),x1,is.STORAGE_PERMANENT)
+ channelsnames[x] = y2;
+ channels[x] = x2;
+ channelsnames[(x + 1)] = y1;
+ channels[(x + 1)] = x1;
+ timerID += 1;
+ setTimeout("InitMenu(menu);",100);
+ }
+ }
+ break;
+ case "Blue":
+ if (menu == 0) {
+ RestartPortal();
+ } else if (menu == 2) {
+ // Show Info local timer/ recording
+ var x = ss.getBookingIds("*", 0, 0);
+ var y = Number(ss.getParameter(x[timerID-1], "Channel"));
+ osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
+ osdepginfo.innerHTML = "<center><pre style='" + color_timerinfo + ";'>" + ss.getParameter(x[timerID-1], "Title") + "\n " + "\n" + y + " - " + channelsnames[y] + "(" + ss.getParameter(x[timerID-1], "Eventid") + ")" + "\n </pre><p style='" + color_epg_info + ";'>" + ss.getParameter(x[timerID-1], "Info") + "</p></center>" ;
+ } else if (menu == 5) {
+ // Show EPG info Timer
+ osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
+ osdepginfo.innerHTML = "<center><pre style='" + color_timerinfo + ";'>\n\n\n" + Lang[0] + "\n\n\n </pre></center>" ;
+ setTimeout("ShowTimerInfo();",100);
+ } else if (menu == 7) {
+ // Show info SearchTimers
+ osdepginfo.innerHTML = SearchTimer[timerID] ;
+ osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
+ } else if (menu == 10) {
+ if (protChn[ChanGroup] !== 1 && ChanGroup !== Fav_group) {
+ AddtoFav();
+ }
+ }
+ break;
+ case "MediaRewind":
+ if (menu == 1) {
+ if (experimental) { // mute output 0 (analog out), keep output 3 'decoder output' unmuted
+ aos.setVolume(0, 0);
+ }
+ }
+ break;
+ case "MediaForward":
+ if (menu == 1) {
+ if (experimental) { aos.setVolume(0, 100); }
+ }
+
+ break;
+ case "MediaStop":
+ if (menu == 1) {
+ //set sleep timer.
+ SleepTimer += 15;
+ if (SleepTimerID != -1) {
+ clearTimeout(SleepTimerID);
+ SleepTimerID = -1;
+ }
+ if (SleepTimer > 90) {
+ SleepTimer = 0;
+ } else {
+ SleepTimerID = setTimeout("SleepTimer = 0;toi.platformService.setStandby(true);", (SleepTimer * 60 * 1000));
+ }
+ } else if (menu == 2) {
+ var x = ss.getBookingIds("*", 0, 0);
+ var y = Number((new Date().getTime()/1000).toFixed(0)) + 2;
+ //stop current recording after 2 sec.
+ ss.reschedule(x[timerID-1],"RecLocal","record_hd_from_ip", y , 0)
+ ss.setParameter(x[timerID-1], "Type", "\uE01C");
+ LoadTimers();
+ }
+ InitMenu(menu);
+ break;
+ case "Teletext":
+ break;
+ case "TV":
+ break;
+ case KEY_1:
+ if (menu == MainMenu) {
+ menu = 1;
+ } else if (menu == 1) {
+ ShowSubs = 1 - ShowSubs;
+ videoplane.subtitles = Boolean(ShowSubs); // Enable subtitles or Disable subtitles
+ is.setObject("vip.showsubs",ShowSubs.toString(),is.STORAGE_PERMANENT);
+ } else if (menu == 8) {
+ SetGroup(1);
+ }
+
+ InitMenu(menu);
+ break;
+ case KEY_2:
+ if (menu == MainMenu) {
+ LoadTimers();
+ timerID = 1;
+ //if (timer.length !== 0) { do { timerID += 1; } while (!timer[timerID] && (timerID < timer.length)) }
+ menu = 2;
+ }
+
+ if (menu == 1) {
+ if(subsmode == 0 ) {
+ is.setObject("cfg.media.subtitling.modepriority","Teletext,DVB",is.STORAGE_PERMANENT);
+ subsmode = 1;
+ } else {
+ is.setObject("cfg.media.subtitling.modepriority","DVB,Teletext",is.STORAGE_PERMANENT);
+ subsmode = 0;
+ }
+ }
+
+ if (menu == 8) {
+ SetGroup(2);
+ }
+ InitMenu(menu);
+ break;
+ case KEY_3:
+ if (menu == 0) {
+ isSetupMenu = 0;
+ medialist.style.opacity = 0.9;
+ mainmenu.style.opacity = 0;
+ setTimeout("getSchedule(currChan);LoadMediaSettings();",100);
+ } else if (menu == 1) {
+ if (audio < (lang_prio.length -1)) { audio += 1} else { audio = 0 }
+ is.setObject("vip.languagepriority",audio.toString(),is.STORAGE_PERMANENT);
+ is.setObject("cfg.media.audio.languagepriority",lang_prio[audio],is.STORAGE_PERMANENT);
+ InitMenu(menu);
+ } else if (menu == 8) {
+ SetGroup(3);
+ InitMenu(menu);
+ }
+
+ break;
+ case KEY_4:
+ if (menu == 0) {
+ isSetupMenu = 0;
+ medialist.style.opacity = 0.9;
+ mainmenu.style.opacity = 0;
+ recPath = "/recordings.xml";
+ setTimeout("getRecList();LoadMediaSettings();",100);
+ } else if (menu == 1) {
+ //Init here. menu = 0 don't need init!
+ menu = 8;
+ InitMenu(menu);
+ } else if (menu == 8) {
+ SetGroup(4);
+ InitMenu(menu);
+ }
+
+ break;
+ case KEY_5:
+ if (menu == MainMenu && (Restfulapiplugin || smartTVplugin)) {
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n\n\n<center>" + Lang[0] + "</center></pre>";
+ timerID = 0;
+ menu = 5;
+ setTimeout("LoadTimersServer();InitMenu(menu);",200);
+ }
+
+ if (menu == 1) {
+ var x = is.getObject("vip.serveraddress");
+ x = Number(x);
+ if (x < (server_ip_array.length -1)) { x += 1} else { x = 0 }
+ is.setObject("vip.serveraddress",x.toString(),is.STORAGE_PERMANENT);
+
+ server_ip = server_ip_array[x];
+ for (var i=0;i<10;i++) {
+ if (ServerAdres[i] !== "FullURL" && ServerAdres[i] !== "MultiCast") {ServerAdres[i] = server_ip + StreamPort;}
+ }
+ InitMenu(menu);
+ }
+
+ if (menu == 8) {
+ SetGroup(5);
+ InitMenu(menu);
+ }
+ break;
+ case KEY_6:
+ if (menu == 0 && Restfulapiplugin) {
+ isSetupMenu = 0;
+ medialist.style.opacity = 0.9;
+ mainmenu.style.opacity = 0;
+ setTimeout("getServerSchedule();LoadMediaSettings();",100);
+ }
+
+ if (menu == 1) {
+ if(showClock == 0 ) {
+ showDisplay("", true, 80, 1 );
+ showClock = 1;
+ } else if(showClock == 1 ) {
+ showClock = 0;
+ showDisplay(currChan.toString(), false, 100, 0 );
+ }
+ InitMenu(menu);
+ }
+ if (menu == 8) {
+ SetGroup(6);
+ InitMenu(menu);
+ }
+
+ break;
+ case KEY_7:
+ if (menu == 0 && smartTVplugin) {
+ isSetupMenu = 0;
+ medialist.style.opacity = 0.9;
+ mainmenu.style.opacity = 0;
+ recPath = "/media.xml";
+ setTimeout("getRecList();LoadMediaSettings();",100);
+ }
+
+
+ if (menu == 1) {
+ ShowProtectedChannels = 1 - ShowProtectedChannels;
+ if (ProtectID) { clearTimeout(ProtectID); }
+ if (ShowProtectedChannels == 0 && ProtectTimeOut !== 0 ) {
+ ProtectID = setTimeout("ShowProtectedChannels = 1; if (protChn[ChanGroup] == 1) {ChanGroup = 0; currChan = defChan[ChanGroup]; play(currChan); }",ProtectTimeOut);
+ }
+ if (ShowProtectedChannels == 1 && protChn[ChanGroup] == 1) { ChanGroup = 0; currChan = defChan[ChanGroup]; play(currChan); }
+ isSetupMenu = 0;
+ mainmenu.style.opacity = 0;
+ }
+ if (menu == 8) {
+ SetGroup(7);
+ InitMenu(menu);
+ }
+
+ break;
+ case KEY_8:
+ if (menu == MainMenu && Restfulapiplugin) {
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[8] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n\n\n<center>" + Lang[0] + "</center></pre>";
+ timerID = 0;
+ menu = 7;
+ setTimeout("LoadSearchTimersServer();InitMenu(menu);",200);
+ }
+ if (menu == 1) {
+ if(SwitchGuide == 0 ) {
+ SwitchGuide = 1;
+ } else if(SwitchGuide == 1 ) {
+ SwitchGuide = 0;
+ }
+ InitMenu(menu);
+ }
+ if (menu == 8) {
+ SetGroup(8);
+ InitMenu(menu);
+ }
+
+
+ break;
+ case KEY_9:
+ if ((menu == 0 || menu == 3) && ShowMPD) {
+ menu = 3;
+ playMPD(server_ip + MPDAddress);
+ } else if (menu == 1) {
+ if (lang_nr < (OSDLang.length -1)) { lang_nr += 1} else { lang_nr = 0 }
+ is.setObject("vip.OSDlanguage",lang_nr.toString(),is.STORAGE_PERMANENT);
+ loadjs(langfile[lang_nr]);
+ setTimeout("InitMenu(menu);",100);
+ } else if (menu == 8) {
+ SetGroup(9);
+ }
+
+ InitMenu(menu);
+ break;
+ case KEY_0:
+ if (menu !== MainMenu && menu !== 8 ) {
+ if (menu == 3 ) { isFullscreen = 0; play(channels[currChan]); isFullscreen = 1; MPDListener = 0;}
+ menu = MainMenu;
+ InitMenu(menu);
+ } else if (menu == 8) {
+ SetGroup(0);
+ InitMenu(menu);
+ } else if (menu == 0) {
+ timerID = 0; maxTimers = Fav_max_channel;
+ menu = 10; if (ChanGroup !== Fav_group) { Fav_key1 = Lang[86]; }
+ InitMenu(menu);
+ }
+
+ break;
+ case "VolumeMute":
+ VolumeMute();
+ break;
+ case "VolumeUp":
+ VolumeUp();
+ break;
+ case "VolumeDown":
+ VolumeDown();
+ break;
+ case KEY_A:// |> key on old long kpn 1710/1760 remote
+ break;
+ case KEY_B:// hh key on old long kpn 1710/1760 remote
+ break;
+ case KEY_C:// @ key on old long kpn 1710/1760 remote
+ if (menu == 10 ) {
+ isSetupMenu = 0;
+ mainmenu.style.opacity = 0;
+ osdepginfo.style.opacity = 0;
+ }
+ break;
+ case KEY_D:// >@ key on old long kpn 1710/1760 remote
+ break;
+
+ default:
+ break;
+ }
+}
+
+
+function InitMenu(menu) {
+
+// 0 = Main Menu
+// 1 = settings menu
+// 2 = Timers menu
+// 3 = MPD Menu
+// 4 = INFO Menu
+// 5 = Timers from Server
+// 6 = Main Menu (when watching recording)
+// 7 = SearchTimers from Server
+// 8 = ChannelGroups enable/disable
+// 9 = INFO2 menu
+// 10 = Favorite Edit menu
+
+osdepginfo.style.opacity = 0;
+
+if(menu == 0) { // Main Menu
+ MainMenu = 0;
+ var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[9] + "\n ( " + Version + " )</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'> 1 -" + Lang[10] + "\n 2 -" + Lang[7] + "\n 3 -" + Lang[11];
+ htmltext += "\n 4 -" + Lang[12];
+ if (Restfulapiplugin) {
+ htmltext += "\n 5 -" + Lang[13];
+ } else {
+ htmltext += "<font style='" + color_notset +";'>" + "\n 5 -" + Lang[13] + "<font style='" + color_main_font +";'>" ;
+ }
+ if (Restfulapiplugin) {
+ htmltext += "\n 6 -" + Lang[14];
+ } else {
+ htmltext += "<font style='" + color_notset +";'>" + "\n 6 -" + Lang[14] + "<font style='" + color_main_font +";'>" ;
+ }
+ if (smartTVplugin) {
+ htmltext += "\n 7 -" + Lang[15];
+ } else {
+ htmltext += "<font style='" + color_notset +";'>" + "\n 7 -" + Lang[15] + "<font style='" + color_main_font +";'>" ;
+ }
+ if (Restfulapiplugin) {
+ htmltext += "\n 8 -" + Lang[16];
+ } else {
+ htmltext += "<font style='" + color_notset +";'>" + "\n 8 -" + Lang[16] + "<font style='" + color_main_font +";'>" ;
+ }
+ if (ShowMPD) {
+ htmltext += "\n 9 -" + Lang[17];
+ } else {
+ htmltext += "<font style='" + color_notset +";'>" + "\n 9 -" + Lang[17] + "<font style='" + color_main_font +";'>" ;
+ }
+
+ htmltext += "\n 0 - " + Lang[83] + "\n\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[35] + " <font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[18] + "</pre>";
+ mainmenu.innerHTML = htmltext;
+}
+
+if(menu == 6) { // Main Menu when watching recording
+ MainMenu = 6;
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[9] + "\n ( " + Version + " )</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'> 1 -" + Lang[10] + "\n 2 -" + Lang[7] + "\n\n\n 5 -" + Lang[13] + "\n\n\n 8 -" + Lang[16] + "\n\n\n\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[35] + " <font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "</pre>";
+}
+
+
+if(menu == 1) { // settings menu
+ var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[10] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'> 1 - ";
+ if (ShowSubs) { htmltext += "\uE017"; } else { htmltext += "\uE016"; }
+ htmltext += Lang[20] + ": " + (is.getObject("cfg.media.subtitling.languagepriority"));
+ if (subs_prio_dyn.length > 0) { htmltext += " (" + (subs_dyn + 1 ) + "/" + subs_prio_dyn.length + ") "; }
+ htmltext += "\n 2 - \uE003" + Lang[22] + (is.getObject("cfg.media.subtitling.modepriority"));
+ htmltext += "\n 3 - \uE003" + Lang[24] + (is.getObject("cfg.media.audio.languagepriority"));
+ htmltext += "\n 4 - " + Lang[82] + "\n 5 - VDR : " + server_ip + "\n 6 - ";
+ if (showClock) { htmltext += "\uE017"; } else { htmltext += "\uE016"; }
+ htmltext += Lang[25] + "\n 7 - ";
+ if (ShowProtectedChannels) { htmltext += "\uE017"; } else { htmltext += "\uE016"; }
+ htmltext += Lang[26] + "\n 8 - ";
+ if (SwitchGuide) { htmltext += "\uE017"; } else { htmltext += "\uE016"; }
+ htmltext += Lang[27] + "\n 9 -" + Lang[23] + OSDLang[lang_nr] + "\n \u25AA -" + Lang[29];
+
+ if (SleepTimer) { htmltext += SleepTimer + Lang[30]; } else { htmltext += Lang[31]; }
+
+ htmltext += "\n\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[20];
+ htmltext += "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> - " + VideoOutputModes_txt[VideoOutputModes[Set_Res]] + " ";
+ htmltext += "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[35];
+ htmltext += "<font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] +"</pre>";
+// htmltext += "\n 0 -" + Lang[9] +"</pre>";
+ mainmenu.innerHTML = htmltext;
+}
+
+if(menu == 2) { // Timers menu
+ booking = "";
+ var x = timerID - 2;
+ var y = ss.getBookingIds("*", 0, 0);
+ if (y.length !== 0) {
+ for (var i=0;i<10;i++) {
+ if (timer.length !== 0) { do { x += 1; } while (!timer[x] && (x < timer.length)) }
+
+ if (i == 0) {
+ booking += "<font style='background:" + color_bg + ";-webkit-border-radius:25px;" + color_main_font + ";font-size:" + fsMenu + ";'>";
+ } else if (i == 1) {
+ booking += "</font>";
+ }
+
+ if (timer.length > x) {
+ try {
+ if (ss.getParameter(y[x], "assetURI")) {
+ // test if there is a file with the timer if so more info is added
+ if (Number(ss.getParameter(y[x], "resume")) == 0 ) {
+ booking += "\uE003\uE010";
+ } else {
+ booking += "\uE003\uE003";
+ }
+ }
+ } catch(e) {
+ booking += "\uE003\uE003";
+ }
+ booking += ss.getParameter(y[x], "Type");
+ booking += timer[x];
+ } else {
+ booking += "\n";
+ }
+ }
+ }
+ if (mediaRecorder) { var x = NN[3]; } else { var x = Lang[19]; }
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n 0 -" + Lang[9] + "\n" + booking + " <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[48] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> - " + x + " <font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> - " + NN[5] + "</pre>";
+}
+
+if(menu == 3) { // MPD Menu
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[33] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>" + Lang[34] + "\n 0 -" + Lang[9] + "</pre>";
+}
+
+if(menu == 4) { // INFO Menu
+ var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[35] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>";
+ try {
+ htmltext += "\n Product name: " + is.getObject("config.productdisplayname");
+ htmltext += "\n Build date : " + is.getObject("config.build.date");
+ htmltext += "\n\n IP address : " + is.getObject("config.ipaddress");
+
+ var x = is.getObject("cfg.ip.eth0.mode");
+ if (x == "DHCP") { htmltext += "\n \uE003\uE017 "; } else { htmltext += "\n \uE003\uE016 "; }
+ htmltext += "DHCP";
+ var x = is.getObject("var.capabilities.dvr");
+ if (x !== "FALSE") { htmltext += "\n \uE003\uE017 "; } else { htmltext += "\n \uE003\uE016 "; }
+ htmltext += "DVR \n";
+ htmltext += "\n VDR address : " + server_ip;
+ htmltext += "\n Vip Client\uE003\uE003\uE003: " + Version;
+ htmltext += "\n Channel list\uE003: " + Chan_Ver;
+
+ } catch(e) {
+ alert("Error : " + e);
+ }
+ htmltext += "\n\n 0 -" + Lang[9] + "</pre>";
+ mainmenu.innerHTML = htmltext;
+
+}
+
+if(menu == 5) { // Timers from Server
+ if (timerOK) {
+ // booking = "<center>" + Lang[32] + "</center>";
+ booking = "<font style='background:" + color_bg + ";-webkit-border-radius:25px;" + color_main_font + ";font-size:" + fsMenu + ";'>";
+ var x = timerID - 1;
+ for (var i=0;i<10;i++) {
+ if (maxTimers !== 0) { do { x += 1; } while (!timers[x] && (x < maxTimers)) }
+ if (maxTimers > x) { booking += timers[x]; } else { booking += "\n"; }
+ if (i == 0) { booking += "</font>"; }
+ }
+ if (get_timer) {
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n" + booking + "\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[48] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[49] + "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + " <font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[28] + "</pre>";
+ } else {
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n" + booking + "\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + " <font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[28] + "</pre>";
+ }
+ }
+}
+
+
+if(menu == 7) { // SearchTimers from Server
+ if (timerOK) {
+ // booking = "<center>" + Lang[32] + "</center>";
+ booking = "<font style='background:" + color_bg + ";-webkit-border-radius:25px;" + color_main_font + ";font-size:" + fsMenu + ";'>";
+ var x = timerID - 1;
+ for (var i=0;i<10;i++) {
+ if (maxTimers !== 0) { do { x += 1; } while (!searchtimers[x] && (x < maxTimers)) }
+ if (maxTimers > x) { booking += searchtimers[x]; } else { booking += "\n"; }
+ if (i == 0) { booking += "</font>"; }
+ }
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[8] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n" + booking + "\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[19] + " <font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[28] + "</pre>";
+
+ }
+}
+
+if(menu == 8) { // ChannelGroups enable/disable
+ var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[80] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n";
+ for (var i=0;i<10;i++) {
+ if (maxChan[i]) {
+ htmltext += "<font style='" + color_main_font + ";'>";
+ } else {
+ htmltext += "<font style='" + color_notset + ";'>";
+ }
+
+ htmltext += "\uE003" + i + "\uE003-\uE003";
+ if (is.getObject(("vip.group." + i)) == "1") { htmltext += "\uE017"; } else { htmltext += "\uE016"; }
+ htmltext += "\uE003" + Lang[81] + i + "\n";
+ }
+ htmltext += "</pre>";
+ mainmenu.innerHTML = htmltext;
+ }
+
+if(menu == 9) { // INFO2 Menu
+ var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[35] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>";
+ try {
+ if (fullupdate !== 0) { htmltext += "\n \uE017 "; } else { htmltext += "\n \uE016 "; }
+ htmltext += "Full EPG Update ";
+
+ experimental = Number(is.getObject("vip.testing"));
+ if (experimental) { htmltext += "\n \uE017 "; } else { htmltext += "\n \uE016 "; }
+ htmltext += "Experimental";
+ if (Number(is.getObject("vip.testing2"))) { htmltext += "\n \uE017 "; } else { htmltext += "\n \uE016 "; }
+ htmltext += "Experimental 2 (Info box 'not in package')";
+ if (Restfulapiplugin) { htmltext += "\n \uE017 "; } else { htmltext += "\n \uE016 "; }
+ htmltext += "Has Restfulapiplugin"
+ if (smartTVplugin) { htmltext += "\n \uE017 "; } else { htmltext += "\n \uE016 "; }
+ htmltext += "Has smartTVplugin"
+ htmltext += "\n gettimers from";
+ if (get_timer == 1) {
+ htmltext += " smarttvweb ";
+ } else {
+ htmltext += " restfulapi ";
+ }
+
+ htmltext += "\n getmarks from";
+ if (get_marks == 1) { htmltext += " smarttvweb "; } else { htmltext += " restfulapi "; }
+ htmltext += "\n getrecordings from";
+ if (get_recordings == 1) {
+ htmltext += " smarttvweb ";
+ } else if (get_recordings == 0) {
+ htmltext += " restfulapi ";
+ } else {
+ htmltext += " streamdev ";
+ }
+ htmltext += "\n EPGMode : "
+ if (EPGMode) { htmltext += "Full EPG"; } else { htmltext += "Now/Next Only"; }
+ } catch(e) {
+ alert("Error : " + e);
+ }
+ htmltext += "\n\n 0 -" + Lang[9] + "</pre>";
+ mainmenu.innerHTML = htmltext;
+
+}
+
+if(menu == 10) { // Favorite edit Menu
+ var htmltext = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[83]
+ htmltext += "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>\n"
+ htmltext += "<font style='background:" + color_bg + ";-webkit-border-radius:25px;" + color_main_font + ";font-size:" + fsMenu + ";'>";
+ var x = timerID;
+ for (var i=0;i<10;i++) {
+ if (maxTimers !== 0) { x += 1;}
+ if (maxTimers >= x && x !== 0) { htmltext += " \u0003\u0003 " + x + " \u0003\u0003 " + channelsnames[(x + Fav_base)] + " \u0003\u0003\u0003 \n"; } else { htmltext += "\n"; }
+ if (i == 0) { htmltext += "</font>"; }
+ }
+ htmltext += "\n <font style='color:red;'>\u25CF<font style='" + color_main_font + ";'> -" + Lang[87];
+ htmltext += "<font style='color:green;'>\u25CF<font style='" + color_main_font + ";'> -"
+ if (timerID == 0) { htmltext += Lang[19] } else { htmltext += Lang[84] } //no move up
+ htmltext += "<font style='color:yellow;'>\u25CF<font style='" + color_main_font + ";'> -"
+ if (timerID == (maxTimers - 1) || x == 0) { htmltext += Lang[19] } else { htmltext += Lang[85] } //no move down
+ htmltext += "<font style='color:blue;'>\u25CF<font style='" + color_main_font + ";'> -" + Fav_key1 + "</pre>";
+ mainmenu.innerHTML = htmltext;
+}
+
+} // end of initmenu
+
+function SetGroup(isgroup) {
+ is.setObject("vip.group." + isgroup,(1 - is.getObject("vip.group." + isgroup)).toString(),is.STORAGE_PERMANENT);
+ if (is.getObject("vip.group." + isgroup) == "0") { minChan[isgroup] = "";} else {minChan[isgroup] = minchan[isgroup];}
+}
+
+function LoadTimers() {
+ timer.length = 0;
+ var booking = "";
+ var x = ss.getBookingIds("*", 0, 0);
+ for (var i=0;i<x.length;i++) {
+ var y = ss.getBooking(x[i]);
+ booking = " ID " + x[i];
+ booking += " " + Left(y.category,1);
+ tijd = y.start;
+ date = new Date(tijd*1000);
+ tijd = date.toUTCString();
+ tijd = new Date(tijd);
+ month = tijd.getMonth();
+ d = tijd.getDate();
+ day = tijd.getDay();
+ var tm = tijd.getMinutes();
+ var th = tijd.getHours();
+ th=addzero(th);
+ tm=addzero(tm);
+
+// booking += " Start " + Left(days[day],3) + " " + d + " " + Left(months[month],3) + " " + th + ":" + tm + " " + (y.duration/60).toFixed(0) + " min";
+ booking += " " + d + " " + Left(months[month],3) + " " + th + ":" + tm + " " + (y.duration/60).toFixed(0) + " min";
+
+ booking += " " + Left(channelsnames[ss.getParameter(x[i], "Channel")],8);
+ booking += " " + Left(ss.getParameter(x[i], "Title"),15);
+ timer[i] = booking + "\n" ;
+
+ }
+}
+
+
+function LoadTimersServer() {
+try {
+
+ if (get_timer==1) {
+ //Get timers from SmartTVweb
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + recServ + "/timers.xml?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("timer");
+ maxTimers = x.length;
+ timers.length = 0; // clear timers[i] tries to clear crap if current x.length < previous x.length
+ if (x.length > 0) {
+ for (var i=0;i<x.length;i++)
+ {
+ var fill = "\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003";
+ timersFlag[i] = x[i].getElementsByTagName("flags")[0].childNodes[0].nodeValue;
+ timersStrt[i] = Right("000" + x[i].getElementsByTagName("start")[0].childNodes[0].nodeValue,4);
+ timersStop[i] = Right("000" + x[i].getElementsByTagName("stop")[0].childNodes[0].nodeValue,4);
+
+ timersEvnt[i] = x[i].getElementsByTagName("eventid")[0].childNodes[0].nodeValue; // event_id
+ timersID[i] = x[i].getElementsByTagName("index")[0].childNodes[0].nodeValue; // index
+ timersChan[i] = x[i].getElementsByTagName("channelid")[0].childNodes[0].nodeValue; // channel_id
+ timersName[i] = x[i].getElementsByTagName("channelname")[0].childNodes[0].nodeValue + fill;
+ timersDay[i] = x[i].getElementsByTagName("day")[0].childNodes[0].nodeValue;
+ timersDays[i] = new Date(timersDay[i]*1000);
+ timersDays[i] = timersDays[i].getDate() + "\uE003" + Left(months[timersDays[i].getMonth()],4);
+ timersFile[i] = x[i].getElementsByTagName("file")[0].childNodes[0].nodeValue + fill + fill;
+
+ if (timersFlag[i] == "1") {
+ timers[i] = "\uE003\uE00C\uE003";
+ } else if (timersFlag[i] == "9" || timersFlag[i] == "11" ) {
+ timers[i] = "\uE003\uE00B\uE003";
+ } else if (timersFlag[i] == "0") {
+ timers[i] = "\uE003\uE003\uE003";
+ } else {
+ timers[i] = "\uE003?\uE003";
+ }
+
+ timers[i] += timersDays[i] + "\uE003" + timersStrt[i] + "\uE003" + timersStop[i] + "\uE003" + Left(timersName[i],8) + "\uE003" + Left(timersFile[i],15) + "\n" ;
+ }
+ }
+ timerOK = 1;
+ } else if (get_timer == 0) {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + RestFulAPI + "/timers.xml"),false); // ?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("timer");
+ maxTimers = x.length;
+ timers.length = 0; // clear timers[i] tries to clear crap if current x.length < previous x.length
+ if (x.length > 0) {
+ 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;
+ timersChan[i] = x[i].getElementsByTagName("param")[11].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);
+ timersEvnt[i] = x[i].getElementsByTagName("param")[8].childNodes[0].nodeValue;
+ 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] += "\uE003\uE003\uE003";
+ }
+ timersName[i] = x[i].getElementsByTagName("param")[15].childNodes[0].nodeValue + fill;
+ timersFile[i] = x[i].getElementsByTagName("param")[14].childNodes[0].nodeValue + fill + fill;
+ if (timersFlag[i] == "1") {
+ timers[i] = "\uE003\uE00C\uE003";
+ } else if (timersFlag[i] == "9") {
+ timers[i] = "\uE003\uE00B\uE003";
+ } else {
+ timers[i] = "\uE003\uE003\uE003";
+ }
+ timers[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);
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[7] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'><center>\n " + Lang[36] + ": \n " + server_ip + "</center></pre>";
+ }
+}
+
+function DeleteTimers() {
+if (get_timer==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);
+ 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 (get_timer==1) {
+ // (De)activate timers.
+ try {
+
+ xmlhttp=new XMLHttpRequest();
+ if (timersFlag[timerID] == "0") {
+ xmlhttp.open("GET",(server_ip + recServ + "/activateTimer?index=" + timersID[timerID] + "&activate=true&" + new Date().getTime()),false);
+ } else {
+ xmlhttp.open("GET",(server_ip + recServ + "/activateTimer?index=" + timersID[timerID] + "&activate=false&" + new Date().getTime()),false);
+ }
+ xmlhttp.send();
+
+ if (timersFlag[timerID] == "0") {
+ timers[timerID] = timers[timerID].substr(0, 1) + "\uE00C" + timers[timerID].substr(2);
+ timersFlag[timerID] = "1"
+ } else {
+ timers[timerID] = timers[timerID].substr(0, 1) + "\uE003" + timers[timerID].substr(2);
+ timersFlag[timerID] = "0"
+ }
+ } catch(e) {
+ alert("(De)Activate Timers problem: " + e);
+ }
+ }
+}
+
+
+function ShowTimerInfo() {
+ if (osdepginfo.style.opacity == 1) {
+ //Like Show EPG Info
+ //setup some dummy vars
+ var info1 = ""; var info2 = ""; var info3 = ""; var info4="";
+ if (timersEvnt[timerID] > 0) {
+
+ try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + RestFulAPI + "/events/" + timersChan[timerID] + "/" + timersEvnt[timerID] + ".xml?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("event");
+ // x[0].getElementsByTagName("param")[1].childNodes[0].nodeValue --> Title
+ // x[0].getElementsByTagName("param")[2].childNodes[0].nodeValue --> Short_text
+ // x[0].getElementsByTagName("param")[3].childNodes[0].nodeValue --> Description
+ // x[0].getElementsByTagName("param")[5].childNodes[0].nodeValue --> ChannelsName
+
+ info1 = x[0].getElementsByTagName("param")[1].childNodes[0].nodeValue;
+ info2 = x[0].getElementsByTagName("param")[5].childNodes[0].nodeValue;
+ info4 = x[0].getElementsByTagName("param")[3].childNodes[0].nodeValue;
+ info3 = x[0].getElementsByTagName("param")[2].childNodes[0].nodeValue + "</p><p>";
+
+ } catch(e) {
+ alert("Get EPG problem: " + e);
+
+ }
+ } else {
+ info3 = Lang[37];
+ }
+ osdepginfo.innerHTML = "<center><pre style='" + color_timerinfo + ";'>" + Left(info1,60) + "\n " + timersDays[timerID] + " " +
+ timersStrt[timerID] + " - " + timersStop[timerID] + "\n" + info2 + "\n </pre><p>" + info3 + Left(info4,750) + "</p></center>" ;
+ }
+}
+
+function LoadSearchTimersServer() {
+try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + RestFulAPI + "/searchtimers.xml?" + new Date().getTime()),false); //"),false); //
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("searchtimer");
+ maxTimers = x.length;
+ searchtimers.length = 0; // clear timers[i] tries to clear crap if current x.length < previous x.length
+ if (x.length > 0) {
+ for (var i=0;i<x.length;i++)
+ {
+ var fill = "\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003\uE003";
+ searchtimersID[i] = x[i].getElementsByTagName("id")[0].childNodes[0].nodeValue;
+ searchtimersSearch[i] = x[i].getElementsByTagName("search")[0].childNodes[0].nodeValue;
+ searchtimersFlag[i] = x[i].getElementsByTagName("use_as_searchtimer")[0].childNodes[0].nodeValue;
+ if (searchtimersFlag[i] == "1") {
+ searchtimers[i] = "\uE003\uE017\uE003";
+ } else if (searchtimersFlag[i] == "0") {
+ searchtimers[i] = "\uE003\uE016\uE003";
+ } else {
+ searchtimers[i] = "\uE003?\uE003";
+ }
+
+ // Extended INFO
+ SearchTimer[i] = "<center><pre style='" + color_main_head + ";'>" + x[i].getElementsByTagName("search")[0].childNodes[0].nodeValue + "\n </pre></center><pre>";
+ if ((x[i].getElementsByTagName("use_as_searchtimer")[0].childNodes[0].nodeValue) == 0) {
+ SearchTimer[i] += "\uE003\uE016\uE003" + Lang[40] + "\n";
+ } else {
+ SearchTimer[i] += "\uE003\uE017\uE003" + Lang[40] + "\n";
+ }
+ SearchTimer[i] = SearchTimer[i] + "\uE003\uE003\uE003Mode :\uE003" + (searchmode[x[i].getElementsByTagName("mode")[0].childNodes[0].nodeValue]) + "\n";
+ if ((x[i].getElementsByTagName("use_time")[0].childNodes[0].nodeValue) == 1) {
+ SearchTimer[i] += "\uE003\uE017\uE003" + Lang[41] + "\uE003" +
+ x[i].getElementsByTagName("start_time")[0].childNodes[0].nodeValue +
+ "\uE003-\uE003" + x[i].getElementsByTagName("stop_time")[0].childNodes[0].nodeValue + "\n";
+ } else {
+ SearchTimer[i] += "\uE003\uE016\uE003" + Lang[41] + "\uE003" + "\n";
+ }
+ if ((x[i].getElementsByTagName("use_dayofweek")[0].childNodes[0].nodeValue) == 0) {
+ SearchTimer[i] += "\uE003\uE016\uE003" + Lang[47] + "\uE003" + "\n";
+ } else {
+ //bit is used for dayofweek.
+ var dowx = x[i].getElementsByTagName("dayofweek")[0].childNodes[0].nodeValue;
+ var dow = "";
+ if (dowx > 0) { var y = 1;} else { var y = 0;}
+ dowx = Math.abs(dowx);
+ for (var dowi=0; dowi<7; dowi++)
+ {
+ var mask = 1 << dowi;
+ if ((dowx & mask) != 0) { dow += days[(dowi+y)] + "\uE003";}
+ }
+ SearchTimer[i] += "\uE003\uE017\uE003" + Lang[47] + "\uE003:\uE003" + dow + "\n";
+ }
+
+
+ if ((x[i].getElementsByTagName("use_channel")[0].childNodes[0].nodeValue) == 0) {
+ SearchTimer[i] += "\uE003\uE016\uE003" + Lang[42] + "\uE003" + "\n";
+ } else {
+ SearchTimer[i] += "\uE003\uE017\uE003" + Lang[42] + "\uE003:\uE003" +
+ searchchan[(x[i].getElementsByTagName("use_channel")[0].childNodes[0].nodeValue)] + "\uE003" +
+ x[i].getElementsByTagName("channels")[0].childNodes[0].nodeValue + "\n";
+ }
+
+ SearchTimer[i] += "\n</pre>";
+ // End of Extended INFO
+
+
+ searchtimers[i] += searchtimersSearch[i] + "\uE003\uE003\n" ;
+ }
+ timerOK = 1;
+ }
+ } catch(e) {
+ timerOK = 0;
+ alert("Get SearchTimers problem: " + e);
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[8] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'><center>\n " + Lang[43] + ": \n " + server_ip + RestFulAPI + "</center></pre>";
+ }
+}
+
+function ShowSearchTimerInfo() {
+ // info about a search timer.
+ //Like Show EPG Info
+ //setup some dummy vars
+
+ var info1 = ""; var info2 = "";
+
+ try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + RestFulAPI + "/searchtimers/search/" + searchtimersID[timerID] + ".xml?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("event");
+ var maxinfo = x.length; if (maxinfo > 15) { maxinfo = 15;}
+
+ for (var i=0;i<maxinfo;i++)
+ {
+ info2 = x[i].getElementsByTagName("param")[16].childNodes[0].nodeValue; // Timer exists
+ if (info2 == "true") {
+ info1 += "\uE003\uE00C\uE003";
+ } else {
+ info1 += "\uE003\uE003\uE003";
+ }
+ info2 = x[i].getElementsByTagName("param")[17].childNodes[0].nodeValue; // Timer active
+ if (info2 == "true") {
+ info1 += "\uE017\uE003";
+ } else {
+ info1 += "\uE016\uE003";
+ }
+
+ info2 = x[i].getElementsByTagName("param")[6].childNodes[0].nodeValue; // Time
+ date = new Date(Number(info2)*1000);
+ month = date.getMonth();
+ d = date.getDate();
+ day = date.getDay();
+ h = date.getHours();
+ m = date.getMinutes();
+ h=addzero(h);
+ m=addzero(m);
+ info2 = Left(days[day],3) + "\uE003" + d + "\uE003" + Left(months[month],3) + "\uE003" + h + ':' + m;
+ info1 += info2;
+ info2 = "\uE003\uE003" + x[i].getElementsByTagName("param")[7].childNodes[0].nodeValue/60 + "\uE003"; // Duration
+ info1 += "\uE003" + Right(info2,3) + Lang[56] + "\uE003" + x[i].getElementsByTagName("param")[5].childNodes[0].nodeValue + "\uE003"; // Channel
+ info1 += "\uE003" + Left(x[i].getElementsByTagName("param")[1].childNodes[0].nodeValue,25) + "\uE003"; // Programm Title
+ info1 += "\n";
+
+ }
+
+ } catch(e) {
+ alert("Get SearchTimer INFO problem: " + e);
+
+ }
+
+ osdepginfo.innerHTML = "<center><pre style='" + color_main_head + ";'>" + searchtimersSearch[timerID] + "\n </pre></center><pre>" + info1 + "</pre>" ;
+
+}
+
+// End of Menu section
+
+// MPD Section
+
+function MPD(ev) {
+// alert("Media player state changed: " + ev);
+// alert("Media player state changed: state=" + ev.state + ", reason=" + ev.reason + ", code=" + ev.code);
+// alert("Media player error :" + mediaPlayer.getError().details);
+if (MPDListener == 0) {
+ if (ev.state == 6 ) {
+ if (ev.reason == "CommandClose" && ErrorAgain == 0) {
+ setTimeout("mediaPlayer.open(URL);mediaPlayer.play(1000);GetEPG(currChan);ExtraStuff();",500);
+ ErrorAgain = 1;
+ } else {
+ ErrorAgain = 0;
+ alert("Media player state changed: state=" + ev.state + ", reason=" + ev.reason + ", code=" + ev.code);
+ showDisplay("ERRR", false, 100, 0 );
+ if (experimental) {
+ settimer(0,ev.reason,0,2,ErrorColor);
+ } else {
+ settimer(0,Lang[67],0,2,ErrorColor);
+ }
+ }
+ }
+
+} else {
+ if ( ev.state == 6 && ev.reason == "HostUnreachable" ) {
+ showDisplay("ERRR", false, 100, 0 );
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[60] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>" + Lang[34] + "\n 0 -" + Lang[9] + "\n 9 -" + Lang[61] + "\n\n<center style='" + color_main_head + ";'>" + Lang[62] + ": \n" + server_ip + MPDAddress + "</center></pre>";
+ } else if ( ev.state == 2 ) { // && ev.reason == "PositionEnd" ) {
+ showDisplay("STOP", false, 100, 0 );
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[60] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>" + Lang[34] + "\n 0 -" + Lang[9] + "\n 9 -" + Lang[63] + "\n\n<center style='" + color_main_head + ";'>" + Lang[64] + ": \n" + server_ip + MPDAddress + "\n" + Lang[65] + "</center></pre>";
+ } else if ( ev.state == 3 && ev.reason == "CommandPlay" ) {
+ showDisplay("MPD", false, 100, 0 );
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[60] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>" + Lang[34] + "\n 0 -" + Lang[9] + "\n\n\n<center style='" + color_main_head + ";'>" + Lang[64] + ": \n" + server_ip + MPDAddress + "</center></pre>";
+ } else {
+ showDisplay("ERRR", false, 100, 0 );
+ mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";" + color_main_head + ";'>" + Lang[60] + "</center></h1><pre style='" + color_main_font + ";font-size:" + fsMenu + ";'>" + Lang[34] + "\n 0 -" + Lang[9] + "\n 9 -" + Lang[63] + "\n\n<center style='" + color_main_head + ";'>Error : " + ev.state + "\n" + Lang[66] + ": " + ev.reason + "</center></pre>";
+ }
+}
+
+}
+
+function playMPD(uri) {
+ try {
+ if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
+ mediaPlayer.close();
+ }
+ MPDListener = 1;
+ mediaPlayer.open(uri);
+ mediaPlayer.play(1000);
+ } catch (e) {
+ alert("Failed opening recording: " + e);
+ return;
+ }
+}
+
+
+// End of MPD Section
+
+// Media Player Section
+
+function LoadMediaSettings() {
+ subgroup = 0;
+ subsubgroup = 0;
+ isMediaMenu = 1;
+ isFullscreen = 0;
+ if (getRecOK !== 2) { showDisplay("STOP", false, 100, 0 ); }
+ currMed = 0;
+ if (getRecOK) { showMediaList();}
+ mediaPlayer.addEventListener(mediaPlayer.ON_POSITION_CHANGED, ShowMediaOSD);
+ mediaPlayer.addEventListener(mediaPlayer.ON_STATE_CHANGED, onStateChanged);
+}
+
+function UnloadMediaSettings() {
+ mediaPlayer.removeEventListener(mediaPlayer.ON_POSITION_CHANGED, ShowMediaOSD);
+ mediaPlayer.removeEventListener(mediaPlayer.ON_STATE_CHANGED, onStateChanged);
+ medialist.style.opacity = 0;
+ osdmedia.style.opacity = 0;
+ osdtime.style.opacity = 0;
+ osdepginfo.style.opacity = 0;
+ medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[0] + "</center></h1>";
+ showDisplay(currChan.toString(), false, 100, 0 );
+ isMediaMenu = 0;
+ isFullscreen = 1;
+ isPause = 0;
+ set_yellow_key = 0;
+ localRecording = 0;
+ if (mediaPlayer.getState() != mediaPlayer.STATE_PLAYING ) {
+ play(channels[currChan]);
+ }
+}
+
+
+
+function onKeyMedia(keyCode) {
+if (DelisOK) {
+ switch(keyCode) {
+ case KEY_OK:
+ medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[0] + "</center></h1>";
+ switchtimer.style.opacity = 0;
+ setTimeout("DelRec2(); getRecList(); showMediaList();",100)
+ default:
+ switchtimer.style.opacity = 0;
+ DelisOK = 0;
+ break;
+ } // end of switch
+} else if (medialist.style.opacity != 0) {
+ switch(keyCode) {
+ case "BrowserBack":
+ if (subgroup && osdepginfo.style.opacity == 0) {
+ subgroup = 0;
+ subsubgroup = 0;
+ if (ShowSubDir) {
+ MakeRecList2();
+ } else {
+ MakeRecList();
+ }
+ setTimeout("showMediaList();",100)
+ break;
+ }
+ if (osdepginfo.style.opacity == 1) { osdepginfo.style.opacity = 0; break; }
+ case "TV":
+ UnloadMediaSettings();
+ break;
+ case "Yellow":
+ if (set_yellow_key) {
+ //hide/display schedule with same button
+ UnloadMediaSettings();
+ }
+ break;
+ case "Right":
+ if (getRecOK !== 0) {
+ for (var i=0;i<10;i++) {
+ do
+ {
+ incMed(1);
+ }
+ // while (!recTitl[currMed]);
+ while (!recList[currMed]);
+ }
+ showMediaList();
+ }
+ break;
+ case "Left":
+ if (getRecOK !== 0) {
+ for (var i=0;i<10;i++) {
+ do
+ {
+ decMed(1);
+ }
+ // while (!recTitl[currMed]);
+ while (!recList[currMed]);
+ }
+ showMediaList();
+ }
+ break;
+ case "Down":
+ if (getRecOK !== 0) {
+ do
+ {
+ incMed(1);
+ }
+ // while (!recTitl[currMed]);
+ while (!recList[currMed]);
+ showMediaList();
+ }
+ break;
+ case "Up":
+ if (getRecOK !== 0) {
+ do
+ {
+ decMed(1);
+ }
+ // while (!recTitl[currMed]);
+ while (!recList[currMed]);
+ showMediaList();
+ }
+ break;
+ case KEY_OK:
+ case "MediaPlayPause":
+ if (getRecOK == 2) {
+ ShowInfo();
+ osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
+ }
+ if (getRecOK == 1) {
+ if (recGroup[currMed] !== 0 && subgroup == 0 && ShowSubDir) {
+ if (subgroup_old) {
+ setTimeout("MakeRecList_sublevel(recGroup[currMed]); showMediaList();",100)
+ } else {
+ setTimeout("MakeRecList3(recGroup[currMed]); showMediaList();",100)
+ }
+ subgroup = 1;
+ } else if (recSubGroup[currMed] !== 0 && subgroup == 1 && subsubgroup == 0 && ShowSubDir && subgroup_old) {
+ setTimeout("MakeRecList_sublevel2(recGroup[currMed],recSubGroup[currMed]); showMediaList();",100)
+ subsubgroup = 1;
+ } else {
+ recList[currMed] = "\u0003" + recList[currMed].substring(1);
+ medialist.style.opacity = 0;
+ if (get_recordings == 1) {
+ setTimeout("GetMarks(); getResume(); playRec(recLink[currMed]+ '?mode=streamtoend&time=' + position);",100);
+ } else if (get_recordings == 2) {
+// setTimeout("playRec(recLink[currMed]+ '?pos=resume');position = (mediaPlayer.getPosition()/1000);",100)
+ position = 0;
+ setTimeout("playRec(recLink[currMed]);",100)
+ }
+ }
+ }
+ break;
+ case "Red":
+ if (getRecOK == 1 && (recGroup[currMed] == 0 || subgroup == 1)) {
+ // Only delete item if it isn't a subdir marker
+ DelRec();
+ }
+ if (getRecOK == 2) { //set timer
+ settimer(recStrt[currMed],recTitl[currMed],recDura[currMed],1,color_switchtimer,recDesc[currMed],recGUID[currMed].toString());
+ }
+ break;
+ case "Blue":
+ // only show info if not a subdir marker or if in EPG mode
+ if ( (getRecOK == 1 && (recGroup[currMed] == 0 || subgroup == 1)) || getRecOK == 2) {
+ ShowInfo();
+ osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
+ }
+ break;
+ case "Green":
+ if (getRecOK == 2 && mediaRecorder) { //set timer only if mediaRecorder = 1, unit has harddisk
+ settimer(recStrt[currMed],recTitl[currMed],recDura[currMed],3,"",recDesc[currMed],recGUID[currMed].toString());
+ }
+ break;
+
+ case "VolumeMute":
+ VolumeMute();
+ break;
+ case "VolumeUp":
+ VolumeUp();
+ break;
+ case "VolumeDown":
+ VolumeDown();
+ break;
+
+ case KEY_REC:
+ case KEY_REC2:
+ // make timer for recording
+ if (getRecOK == 2) { //set timer
+ settimer(recStrt[currMed],recTitl[currMed],recDura[currMed],2);
+ ServerTimer(channels[currChan],recGUID[currMed]);
+ }
+ break;
+ case KEY_0:
+ if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
+ // Only rewind file if it isn't a subdir marker
+ setResumeNull();
+ showMediaList();
+ }
+ break;
+ case KEY_1:
+ if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
+ // Only do reccmds if it isn't a subdir marker
+ reccmds(1);
+ }
+ break;
+ case KEY_2:
+ if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
+ // Only do reccmds if it isn't a subdir marker
+ reccmds(2);
+ }
+ break;
+ case KEY_3:
+ if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
+ // Only do reccmds if it isn't a subdir marker
+ reccmds(3);
+ }
+ break;
+ case KEY_4:
+ if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
+ // Only do reccmds if it isn't a subdir marker
+ reccmds(4);
+ }
+ break;
+ case KEY_5:
+ if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
+ // Only do reccmds if it isn't a subdir marker
+ reccmds(5);
+ }
+ break;
+ case KEY_6:
+ if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
+ // Only do reccmds if it isn't a subdir marker
+ reccmds(6);
+ }
+ break;
+ case KEY_7:
+ if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
+ // Only do reccmds if it isn't a subdir marker
+ reccmds(7);
+ }
+ break;
+ case KEY_8:
+ if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
+ // Only do reccmds if it isn't a subdir marker
+ reccmds(8);
+ }
+ break;
+ case KEY_9:
+ if (getRecOK == 1 && (recGroup[currMed] == 0 || recSubGroup[currMed] == 0 || subsubgroup == 1)) {
+ // Only do reccmds if it isn't a subdir marker
+ reccmds(9);
+ }
+ break;
+
+
+
+ default:
+ break;
+ } // end of switch
+} else {
+ switch(keyCode) {
+ case "BrowserBack":
+// ShowInfo();
+// osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
+ break;
+ case "TV":
+ setResume();
+ play(channels[currChan]);
+ UnloadMediaSettings();
+ break;
+ break;
+ case "Down":
+ if (mediaPlayer.getState() != mediaPlayer.STATE_PAUSED) {
+ showDisplay("PAUS", false, 100, 0 );
+ mediaPlayer.play(0);
+ }
+ break;
+ case "Up":
+ if (mediaPlayer.getState() != mediaPlayer.STATE_PLAYING) {
+ if (currMed == -1 || localRecording == 1 ) {
+ showDisplay("PLAY", false, 100, 0 );
+ mediaPlayer.play(1000);
+ } else {
+ position += (mediaPlayer.getPosition()/1000);
+ if (get_recordings == 1) {
+ playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
+ } else if (get_recordings == 2) {
+ playRec((recLink[currMed] + "?pos=time." + position));
+ }
+ }
+ }
+ break;
+ case KEY_OK:
+ osdmedia.style.opacity = 1 - osdmedia.style.opacity;
+ osdtime.style.opacity = osdmedia.style.opacity;
+ ShowMediaOSD();
+ break;
+ case "Green":
+ if (audio_dyn < (lang_prio_dyn.length -1)) { audio_dyn += 1} else { audio_dyn = 0 }
+ if (lang_prio_dyn.length > 1) {
+ is.setObject("cfg.media.audio.languagepriority",lang_prio_dyn[audio_dyn] + "," + lang_prio[audio],is.STORAGE_PERMANENT);
+ osdlang.style.opacity = 1;
+ osdlang.innerHTML = "<img src='unmute.png'> " + lang_prio_dyn[audio_dyn] + " ";
+ setTimeout("osdlang.style.opacity = 0; ", 3000);
+ }
+ break;
+ case "Yellow":
+ ShowSubs = 1 - ShowSubs;
+ videoplane.subtitles = Boolean(ShowSubs); // Enable subtitles or Disable subtitles
+ break;
+ case "Blue":
+ if ( isPause == 0 ) {
+ ShowInfo();
+ osdepginfo.style.opacity = 1 - osdepginfo.style.opacity;
+ }
+ break;
+ case "Red":
+ GetMarks();
+ ShowMediaOSD();
+ break;
+
+ case "Menu":
+ osdepginfo.style.opacity = 0;
+ osdepginfonext.style.opacity = 0;
+ isSetupMenu = 1;
+ mainmenu.style.opacity = 0.8;
+ menu = 6;
+ InitMenu(menu);
+ break;
+
+ case "VolumeMute":
+ VolumeMute();
+ break;
+ case "VolumeUp":
+ VolumeUp()
+ break;
+ case "VolumeDown":
+ VolumeDown();
+ break;
+
+
+ case KEY_REC:
+ case KEY_REC2:
+ break;
+ case "MediaRewind":
+ if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
+ mediaPlayer.play(-4000);
+ showDisplay("REW", false, 100, 0 );
+ }
+ break;
+ case "MediaForward":
+ if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
+ mediaPlayer.play(4000);
+ showDisplay("FF", false, 100, 0 );
+ }
+ break;
+ case "MediaStop":
+ if (currMed == -1 || isPause == 1 || localRecording == 1) {
+ if (localRecording == 1) {
+ ss.setParameter(recDummy[0], "resume", mediaPlayer.getPosition().toString());
+ }
+ osdepginfo.style.opacity = 0;
+ isFullscreen = 1; play(channels[currChan]);
+ UnloadMediaSettings();
+ } else {
+ setResume();
+ osdepginfo.style.opacity = 0;
+ isFullscreen = 0; play(channels[currChan]); isFullscreen = 1;
+ medialist.style.opacity = 0.9;
+ showDisplay("STOP", false, 100, 0 );
+ showMediaList();
+ }
+ break;
+ case "MediaPlayPause":
+ if (mediaPlayer.getState() != mediaPlayer.STATE_PAUSED) {
+ showDisplay("PAUS", false, 100, 0 );
+ mediaPlayer.play(0);
+ } else {
+ if (currMed == -1 || localRecording == 1) {
+ showDisplay("PLAY", false, 100, 0 );
+ mediaPlayer.play(1000);
+ } else {
+ position += (mediaPlayer.getPosition()/1000);
+ if (get_recordings == 1) {
+ playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
+ } else if (get_recordings == 2) {
+ playRec((recLink[currMed] + "?pos=time." + position));
+ }
+ }
+ }
+ break;
+ case KEY_1:
+ if (localRecording != 1 ) {
+ position += (mediaPlayer.getPosition()/1000) - 30;
+ if (position <= 0) { position = 0;}
+ if (get_recordings == 1) {
+ playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
+ } else if (get_recordings == 2) {
+ playRec((recLink[currMed] + "?pos=time." + position));
+ }
+ } else {
+ mediaPlayer.playFromPosition((mediaPlayer.getPosition()-30000),1000);
+ }
+ break;
+ case KEY_4:
+ if (localRecording != 1 ) {
+ position += (mediaPlayer.getPosition()/1000) - 60;
+ if (position <= 0) { position = 0;}
+ if (get_recordings == 1) {
+ playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
+ } else if (get_recordings == 2) {
+ playRec((recLink[currMed] + "?pos=time." + position));
+ }
+ } else {
+ mediaPlayer.playFromPosition((mediaPlayer.getPosition()-60000),1000);
+
+ }
+ break;
+ case KEY_7:
+ if (localRecording != 1 ) {
+ position += (mediaPlayer.getPosition()/1000) - 240;
+ if (position <= 0) { position = 0;}
+ if (get_recordings == 1) {
+ playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
+ } else if (get_recordings == 2) {
+ playRec((recLink[currMed] + "?pos=time." + position));
+ }
+ } else {
+ mediaPlayer.playFromPosition((mediaPlayer.getPosition()-240000),1000);
+
+ }
+ break;
+
+ case KEY_5:
+ if (localRecording != 1 ) {
+ if (recMark.length>posMark && get_recordings == 1) {
+ position = recMark[posMark];
+ playRec(recLink[currMed] + "?mode=streamtoend&time=" + position);
+ }
+ }
+ break;
+ case KEY_2:
+ if (localRecording != 1 ) {
+ if (posMark>0 && get_recordings == 1) {
+ posMark -= 1;
+ position = recMark[posMark];
+ playRec(recLink[currMed] + "?mode=streamtoend&time=" + position);
+ }
+ }
+ break;
+ case KEY_8:
+ if (localRecording != 1 ) {
+ if (recMark[posMark+1] && get_recordings == 1) {
+ posMark += 1;
+ position = recMark[posMark];
+ playRec(recLink[currMed] + "?mode=streamtoend&time=" + position);
+ }
+ }
+ break;
+
+
+
+ case KEY_3:
+ if (localRecording != 1 ) {
+ position += (mediaPlayer.getPosition()/1000) + 30;
+ if (get_recordings == 1) {
+ if (position >= recDura[currMed]) {
+ BackToTV();
+ } else {
+ playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
+ }
+ } else if (get_recordings == 2) {
+ playRec((recLink[currMed] + "?pos=time." + position));
+ }
+ } else {
+ mediaPlayer.playFromPosition((mediaPlayer.getPosition()+30000),1000);
+ }
+ break;
+ case KEY_6:
+ if (localRecording != 1 ) {
+ position += (mediaPlayer.getPosition()/1000) + 60;
+ if (get_recordings == 1) {
+ if (position >= recDura[currMed]) {
+ BackToTV();
+ } else {
+ playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
+ }
+ } else if (get_recordings == 2) {
+ playRec((recLink[currMed] + "?pos=time." + position));
+ }
+ } else {
+ mediaPlayer.playFromPosition((mediaPlayer.getPosition()+60000),1000);
+ }
+ break;
+ case KEY_9:
+ if (localRecording != 1 ) {
+ position += (mediaPlayer.getPosition()/1000) + 240;
+ if (get_recordings == 1) {
+ if (position >= recDura[currMed]) {
+ BackToTV();
+ } else {
+ playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
+ }
+ } else if (get_recordings == 2) {
+ playRec((recLink[currMed] + "?pos=time." + position));
+ }
+ } else {
+ mediaPlayer.playFromPosition((mediaPlayer.getPosition()+240000),1000);
+ }
+ break;
+ case KEY_0:
+ if (localRecording != 1 ) {
+ position = 0; posMark = 0;
+ if (get_recordings == 1) {
+ playRec((recLink[currMed] + "?mode=streamtoend&time=" + position));
+ } else if (get_recordings == 2) {
+ playRec((recLink[currMed] + "?pos=time." + position));
+ }
+ } else {
+ mediaPlayer.playFromPosition(0,1000)
+ }
+ break;
+
+ default:
+ break;
+ } // end of switch
+ } // end of if
+}
+
+function getRecList() {
+ getVDRstatus();
+ MaxInGroup = 14;
+ subgroup = 0;
+ subsubgroup = 0;
+try {
+ if (get_recordings ==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 (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);
+ 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 i=0;i<x.length;i++) {
+ recTitl[i] = rec_lst[i][0];
+ recLink[i] = rec_lst[i][1];
+ recDesc[i] = rec_lst[i][2];
+ recDura[i] = rec_lst[i][3];
+ recStrt[i] = rec_lst[i][4];
+ rec_New[i] = rec_lst[i][5];
+ recGUID[i] = rec_lst[i][6];
+ 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);
+ //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 if (get_recordings == 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;
+
+ 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.split(" ");
+ rec_lst[i][0] = rec_lst[i][0][1].split("~");
+ rec_lst[i][1] = x[i].getElementsByTagName("enclosure")[0].getAttribute('url');
+ rec_lst[i][2] = Lang[37];
+ rec_lst[i][3] = Lang[37];
+ rec_lst[i][4] = x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue;
+ rec_lst[i][4] = rec_lst[i][4].split(" ");
+ rec_lst[i][4] = rec_lst[i][4][1] + " " + rec_lst[i][4][2];
+ rec_lst[i][5] = Lang[37];
+ rec_lst[i][6] = x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue;
+ rec_lst[i][7] = 0;
+ rec_lst[i][8] = 0;
+ }
+
+ rec_lst.sort();
+ for (var i=0;i<x.length;i++) {
+ recTitl[i] = rec_lst[i][0];
+ recLink[i] = rec_lst[i][1];
+ recDesc[i] = rec_lst[i][2];
+ recDura[i] = rec_lst[i][3];
+ recStrt[i] = rec_lst[i][4];
+ rec_New[i] = rec_lst[i][5];
+ recGUID[i] = rec_lst[i][6];
+ recChan[i] = rec_lst[i][7];
+ recProt[i] = rec_lst[i][8];
+ }
+
+
+ recProt[i] = 1;
+} else if (get_recordings == 0) {
+ // get recordings from restfulapi
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + RestFulAPI + "/recordings.xml?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("recording");
+ nrMedia = x.length - 1;
+ recTitl.length = 0;
+ rec_lst.length = 0;
+
+ 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("param")[1].childNodes[0].nodeValue;
+ rec_lst[i][0] = rec_lst[i][0].split("~");
+ rec_lst[i][1] = x[i].getElementsByTagName("param")[2].childNodes[0].nodeValue;
+ rec_lst[i][2] = x[i].getElementsByTagName("param")[13].textContent;
+ rec_lst[i][3] = x[i].getElementsByTagName("param")[8].childNodes[0].nodeValue;
+ rec_lst[i][4] = x[i].getElementsByTagName("param")[14].childNodes[0].nodeValue;
+ rec_lst[i][5] = x[i].getElementsByTagName("param")[4].childNodes[0].nodeValue;
+ rec_lst[i][6] = x[i].getElementsByTagName("param")[0].childNodes[0].nodeValue;
+ //Get channel number from recordings, shows right names only if server & client use same channel order
+ recDummy = rec_lst[i][1].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 i=0;i<x.length;i++) {
+ recTitl[i] = rec_lst[i][0];
+ recLink[i] = rec_lst[i][1];
+ recDesc[i] = rec_lst[i][2];
+ recDura[i] = rec_lst[i][3];
+ recStrt[i] = rec_lst[i][4];
+ rec_New[i] = rec_lst[i][5];
+ recGUID[i] = rec_lst[i][6];
+ recChan[i] = rec_lst[i][7];
+ recProt[i] = rec_lst[i][8];
+ }
+ recProt[i] = 1;
+ // try to fix display double entries in the last directory. (Only shown for some time after deleting files, should be fixed now)
+}
+
+
+//end of get_recordings
+ if (ShowSubDir) {
+ MakeRecList2();
+ } else {
+ MakeRecList();
+ }
+ if (i!==0) { getRecOK = 1; } else {
+ getRecOK = 0;
+ medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[38] + "</center><pre>\n\n\n" + Lang[37] + "</pre></h1>";
+ }
+
+ } catch(e) {
+ alert("Get Recordings problem: " + e);
+ getRecOK = 0;
+ medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[38] + "</center><pre>\n\n\n" + Lang[39] + "</pre></h1>";
+ }
+}
+
+
+function GetMarks() {
+
+if (get_marks==1) {
+ try {
+ posMark = 0;
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + recServ + "/getMarks.xml?guid=" + recGUID[currMed] + "&" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ recMark = [];
+ var x=xmlDoc.getElementsByTagName("mark");
+ for (var i=0;i<x.length;i++)
+ {
+ var y = x[i].childNodes[0].nodeValue.split(",");
+ recMark[i] = Number(y[0]);
+ }
+ } catch(e) {
+ alert("Getting Marks problem: " + e);
+ }
+ } else {
+ try {
+ posMark = 0;
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + RestFulAPI + "/recordings/" + currMed + ".xml?marks=true&" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ recMark = [];
+ var x=xmlDoc.getElementsByTagName("mark");
+ for (var i=0;i<x.length;i++)
+ {
+ var y = x[i].childNodes[0].nodeValue.split(":");
+ recMark[i] = Number(y[0]*3600) + Number(y[1]*60) + Number(y[2]);
+ }
+ } catch(e) {
+ alert("Getting Marks problem: " + e);
+ }
+ }
+}
+
+
+function setResume() {
+if (get_recordings == 1) {
+try {
+ position += (mediaPlayer.getPosition()/1000)
+ var xmlhttp = new XMLHttpRequest();
+ xmlhttp.open("POST", server_ip + recServ + "/setResume.xml?guid=" + recGUID[currMed] + "&resume=" + position, false);
+ xmlhttp.send();
+ recList[currMed] = "\uE003" + recList[currMed].substring(1);
+ } catch(e) {
+ alert("Setting Resume problem: " + e);
+ }
+}
+}
+
+function getResume() {
+position = 0;
+if (get_recordings == 1) {
+try {
+ var xmlhttp = new XMLHttpRequest();
+ var i = 0;
+ xmlhttp.open("GET", server_ip + recServ + "/getResume.xml?guid=" + recGUID[currMed] + "&" + new Date().getTime(), false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ i = xmlDoc.getElementsByTagName("resume")[0].childNodes[0].nodeValue.split(",");
+ position = Number(i[0]);
+ } catch(e) {
+ alert("Getting Resume problem: " + e);
+ }
+}
+}
+
+
+function setResumeNull() {
+if (get_recordings == 1) {
+try {
+ var xmlhttp = new XMLHttpRequest();
+ xmlhttp.open("POST", server_ip + recServ + "/setResume.xml?guid=" + recGUID[currMed] + "&resume=0", false);
+ xmlhttp.send();
+ recList[currMed] = "\uE010" + recList[currMed].substring(1);
+ } catch(e) {
+ alert("Setting Resume problem: " + e);
+ }
+}
+}
+
+function reccmds(option) {
+try {
+ option = Number(option);
+ if (RecCmds[option] > -1 ) {
+ var xmlhttp = new XMLHttpRequest();
+ xmlhttp.open("POST", server_ip + recServ + "/execreccmd?cmd=" + RecCmds[option] + "&guid=\"" + recGUID[currMed] + "\"", false);
+ xmlhttp.send();
+ recList[currMed] = RecCmdsIcon[option] + recList[currMed].substring(1);
+ showMediaList();
+ }
+ } catch(e) {
+ alert("Execute reccmds problem: " + e);
+ }
+
+}
+
+
+
+function CheckPlugins() {
+try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + recServ + "/vdrstatus.xml?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ smartTVplugin = 1;
+ } catch(e) {
+ alert("NO smartTVplugin: " + e);
+ smartTVplugin = 0;
+ }
+
+//Check for Restfulapi
+
+try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + RestFulAPI + "/info.xml?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ Restfulapiplugin = 1;
+ } catch(e) {
+ alert("NO Restfulapiplugin: " + e);
+ Restfulapiplugin = 0;
+ }
+}
+
+function getVDRstatus() {
+if (smartTVplugin == 1) {
+try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + recServ + "/vdrstatus.xml?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+// var x=xmlDoc.getElementsByTagName("vdrstatus");
+ var x=xmlDoc.getElementsByTagName("diskspace");
+ free_space = x[0].getElementsByTagName("free")[0].childNodes[0].nodeValue;
+ perc_space = x[0].getElementsByTagName("percent")[0].childNodes[0].nodeValue;
+ } catch(e) {
+ alert("Get VDR Status problem: " + e);
+ }
+}
+if (smartTVplugin == 0 && Restfulapiplugin == 1) {
+try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + RestFulAPI + "/info.xml?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("diskusage");
+ free_space = x[0].getElementsByTagName("free_mb")[0].childNodes[0].nodeValue;
+ perc_space = x[0].getElementsByTagName("used_percent")[0].childNodes[0].nodeValue;
+ } catch(e) {
+ alert("Get VDR Status problem: " + e);
+ }
+ }
+}
+
+
+function DelRec() {
+ if (osdepginfo.style.opacity == 1) {osdepginfo.style.opacity = 0;}
+try {
+ //popup for confirm
+ switchtimer.style.background = "red";
+ switchtimer.style.opacity = 1;
+ switchtimer.innerHTML = "<pre><center>" + Lang[44] +"\n" + Lang[45] + "\n\n " + Left(recTitl[currMed],30) + "</center></pre>"; // Recording Name
+ DelisOK = 1
+ } catch(e) {
+ alert("Delete Recordings problem: " + e);
+ }
+}
+
+function DelRec2() {
+ if (get_recordings == 1) {
+ try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("POST",(server_ip + recServ + "/deleteRecording.xml?id=" + recGUID[currMed] ),false);
+ xmlhttp.send();
+ recList[currMed] = "";
+ recGroup[currMed] = -1;
+ recProt[currMed] = 0;
+ } catch(e) {
+ alert("Delete Recordings problem: " + e);
+ }
+ } else if (get_recordings == 0) {
+// try {
+// xmlhttp=new XMLHttpRequest();
+// xmlhttp.open("DELETE",(server_ip + RestFulAPI + "/recordings/" + recGUID[currMed] ),true);
+// xmlhttp.send();
+// recList[currMed] = "";
+// recGroup[currMed] = -1;
+// recProt[currMed] = 0;
+// } catch(e) {
+// alert("Delete Recordings problem: " + e);
+// }
+//
+ }
+}
+
+
+
+
+function MakeRecList() {
+//old style list
+ var x = "";
+ var xx = "";
+ for (var i=0;i<recTitl.length;i++)
+ {
+ if (recTitl[i][recMap + 2]) {
+ if (recTitl[i][recMap + 1] != xx) {
+ var y = recTitl[i][recMap].length + 1;
+ if (recTitl[i][recMap] != x) {
+ recList[i] = "\uE002 " + recTitl[i][recMap] + " \uE002 " + String(recTitl[i]).substring(y);
+ } else {
+ recList[i] = "\uE003 " + new Array(y).join("\uE003") + " \uE002 " + String(recTitl[i]).substring(y);
+ }
+ } else {
+ var y = recTitl[i][recMap + 1].length + recTitl[i][recMap].length + 4;
+ recList[i] = new Array(y).join("\uE003") + String(recTitl[i]).substring(y - 2);
+ }
+ } else if (recTitl[i][recMap + 1]) {
+ if (recTitl[i][recMap] != x) {
+ recList[i] = "\uE002" + recTitl[i];
+ } else {
+ var y = recTitl[i][recMap].length + 4;
+ recList[i] = new Array(y).join("\uE003") + String(recTitl[i]).substring(y - 3);
+ }
+ } else {
+ recList[i] = "\uE003" + recTitl[i];
+ }
+ if (get_recordings == 2 ) {
+ result = recStrt[i];
+ } else{
+ AddInfo(i);
+ }
+
+ if (rec_New[i] == "true" )
+ {
+ recList[i] = "\uE010" + result + "\uE003" + recList[i];
+ } else {
+ recList[i] = "\uE003" + result + "\uE003" + recList[i];
+ }
+ x = recTitl[i][recMap];
+ xx = recTitl[i][recMap + 1];
+ if ((recProt[i] == 1) && (ShowProtectedChannels == 1)) { recList[i] = "";}
+ }
+}
+
+function MakeRecList2() {
+//new style with sub maps
+ var x = "";
+ var xx = 0;
+ for (var i=0;i<recTitl.length;i++)
+ {
+ if (recTitl[i][1]) {
+ if (recTitl[i][0] != x) {
+ recList[i] = "\uE002\uE003" + recTitl[i][0];
+ xx += 1;
+ } else {
+ recList[i] = "" ;
+ }
+ recGroup[i] = xx;
+ } else {
+ recGroup[i] = 0;
+ if (get_recordings == 2 ) {
+ result = recStrt[i];
+ } else{
+ AddInfo(i);
+ if (recChan[i] !== "Media File") {result += "\uE003" + (recDura[i]/60).toFixed(0);}
+ }
+ if (rec_New[i] == "true" ) {
+ recList[i] = "\uE010" + result + "\uE003" + recTitl[i];
+ } else {
+ recList[i] = "\uE003" + result + "\uE003" + recTitl[i];
+ }
+ }
+
+ if ((recProt[i] == 1) && (ShowProtectedChannels == 1)) { recList[i] = "";}
+
+ x = recTitl[i][0];
+ }
+}
+
+function MakeRecList3(GroupID) {
+
+ MaxInGroup = -1;
+ for (var i=0;i<recTitl.length;i++)
+ {
+ if (recGroup[i] == GroupID) {
+ var tmp = "";
+ for (var ii=1;ii<recTitl[i].length;ii++)
+ {
+ tmp += "\uE003" + recTitl[i][ii];
+ }
+ if (get_recordings == 2 ) {
+ result = recStrt[i];
+ } else{
+ AddInfo(i);
+ if (recChan[i] !== "Media File") {result += "\uE003" + (recDura[i]/60).toFixed(0);}
+ }
+ if (rec_New[i] == "true" ) {
+ recList[i] = "\uE010" + result + tmp; // recTitl[i];
+ } else {
+ recList[i] = "\uE003" + result + tmp; //recTitl[i];
+ }
+
+ MaxInGroup = MaxInGroup + 1;
+ if ((recProt[i] == 1) && (ShowProtectedChannels == 1)) { recList[i] = "";}
+
+ } else {
+ recList[i] = "" ;
+ }
+ }
+}
+
+//
+//
+// sub-sublevel testing
+//
+//
+
+function MakeRecList_sublevel(GroupID) {
+//new style with sub maps on sub maps
+ var x = "";
+ var xx = 0;
+ recList.length = 0;
+ MaxInGroup = -1;
+ for (var i=0;i<recTitl.length;i++)
+ {
+ if (recGroup[i] == GroupID) {
+ Group_Header[GroupID] = recTitl[i][0];
+ if (recTitl[i][2]) {
+ if (recTitl[i][1] != x) {
+
+ recList[i] = "\uE002\uE003" + recTitl[i][1];
+ xx += 1;
+ } else {
+ recList[i] = "" ;
+ }
+ recSubGroup[i] = xx;
+ } else {
+ recSubGroup[i] = 0;
+ var tmp = "";
+ for (var ii=1;ii<recTitl[i].length;ii++)
+ {
+ tmp += "\uE003" + recTitl[i][ii];
+ }
+ if (get_recordings == 2 ) {
+ result = recStrt[i];
+ } else{
+ AddInfo(i);
+ if (recChan[i] !== "Media File") {result += "\uE003" + (recDura[i]/60).toFixed(0);}
+ }
+ if (rec_New[i] == "true" ) {
+ recList[i] = "\uE010" + result + tmp; // recTitl[i];
+ } else {
+ recList[i] = "\uE003" + result + tmp; //recTitl[i];
+ }
+ }
+ if ((recProt[i] == 1) && (ShowProtectedChannels == 1)) { recList[i] = "";}
+ if (recList[i] != "") { MaxInGroup = MaxInGroup + 1; }
+ x = recTitl[i][1];
+ }
+ }
+//MakeRecList_sublevel2(GroupID,0);
+}
+
+
+function MakeRecList_sublevel2(GroupID,SubGroupID) {
+ MaxInGroup = -1;
+ for (var i=0;i<recTitl.length;i++)
+ {
+ if (recGroup[i] == GroupID && recSubGroup[i] == SubGroupID) {
+ var tmp = ""; var xx = "\uE003";
+ for (var ii=2;ii<recTitl[i].length;ii++)
+ {
+ if (recTitl[i][(ii+1)]) {
+ tmp += "\uE003\uE002" + recTitl[i][ii];
+ xx = "/";
+ } else {
+ tmp += xx + recTitl[i][ii];
+ }
+ }
+ if (get_recordings == 2 ) {
+ result = recStrt[i];
+ } else{
+ AddInfo(i);
+ if (recChan[i] !== "Media File") {result += "\uE003" + (recDura[i]/60).toFixed(0);}
+ }
+ if (rec_New[i] == "true" ) {
+ recList[i] = "\uE010" + result + tmp; // recTitl[i];
+ } else {
+ recList[i] = "\uE003" + result + tmp; //recTitl[i];
+ }
+
+ MaxInGroup = MaxInGroup + 1;
+ if ((recProt[i] == 1) && (ShowProtectedChannels == 1)) { recList[i] = "";}
+
+ } else {
+ recList[i] = "" ;
+ }
+ }
+}
+
+//
+//
+// End of sub-sublevel testing
+//
+//
+
+function AddInfo(info) {
+//Add Date to item
+ date = new Date(Number(recStrt[info])*1000);
+ year = date.getFullYear();
+ month = date.getMonth();
+ d = date.getDate();
+ h = date.getHours();
+ m = date.getMinutes();
+ month=addzero(month + 1);
+ d=addzero(d);
+ h=addzero(h);
+ m=addzero(m);
+ if ( year==1970 ) {
+ result = "\uE003";
+ } else {
+ result = "\uE003" + d + '-' + month + '-' + year + ' ' + h + ':' + m;
+ }
+//
+}
+
+function showMediaList() {
+ if (osdepginfo.style.opacity == 1) {osdepginfo.style.opacity = 0;}
+ osdmedia.style.opacity = 0;
+ osdtime.style.opacity = 0;
+ var liststyle = "";
+ listMed = currMed - 1;
+ var MaxMed = -1;
+
+ if (getRecOK == 1) {
+ var htmlstring = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[38] + "(" + Lang[46] + (100 - perc_space) + "%, " + (free_space/1024).toFixed(0) + " GB) </center></h1><table border='0'><tr>";
+
+ if (subgroup) {
+ htmlstring = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Group_Header[Number(recGroup[currMed])] + "</center></h1><table border='0'><tr>";
+ if (MaxInGroup < 14){ MaxMed = MaxInGroup; } else {MaxMed = 14; }
+ }
+ if (!subgroup) {
+ for(var i=0; i<=nrMedia; i++) {
+ if (recList[i]) { MaxMed += 1;}
+ }
+ }
+
+ } else {
+
+ if (nrMedia < 14) {MaxMed = nrMedia; } else {MaxMed = 14; }
+ var htmlstring = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[11] + channelsnames[currChan] + " </center></h1><table border='0'><tr>";
+ }
+
+ if (MaxMed > 14) { MaxMed = 14; }
+ if (MaxMed < 0 ) { MaxMed = 0; }
+
+ for(var i=currMed; i<=currMed + MaxMed; i++) {
+ if (listMed>=nrMedia) { listMed= -1; }
+ if (listMed<-1) { listMed=nrMedia - 1; }
+// if (listMed>nrMedia) { listMed= -1; }
+
+ do
+ {
+ listMed += 1;
+ }
+ while (!recList[listMed] && (listMed<=nrMedia));
+
+ if ( listMed == currMed) {
+ liststyle = " style='background:" + color_bg + ";-webkit-border-radius:25px;";
+ } else {
+ liststyle = " style='";
+ }
+
+// alert(recList[listMed]);
+// alert(listMed + " : " + nrMedia);
+ if (listMed > nrMedia) { recList[listMed] = ""; }
+
+ if (recList[listMed]) {
+ //Solves empty string at the end.
+ htmlstring += "<td" + liststyle + "font-size:" + fsReclist + ";'>\uE003" + Left(recList[listMed],60) + "\uE003\uE003</td></tr>";
+ }
+ }
+ medialist.innerHTML = htmlstring + "</table>";
+ //ShowInfo();
+}
+
+function getServerSchedule() {
+try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + RestFulAPI + "/events/" + channels[currChan] + ".xml?timespan=" + serverEPGdays + "&" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("event");
+ nrMedia = x.length - 1;
+ for (var i=0;i<x.length;i++)
+ {
+
+/* // restful api layout dd 10/04/2013
+ // <event>
+ // 1 <param name="id">516</param>
+ // 2 <param name="title">Thuis</param>
+ // 3 <param name="short_text"/ >
+ // 4 <param name="description">Soapserie (BE).</param>
+ // 5 <param name="channel">S19.2E-53-1105-4016</param>
+ // 6 <param name="channel_name">BVN (S)</param>
+ // 7 <param name="start_time">1365608700</param>
+ // 8 <param name="duration">1500</param>
+ // 9 <param name="table_id">78</param>
+ // 10 <param name="version">7</param>
+ // 11 <param name="parental_rating">0</param>
+ // 12 <param name="vps">0</param>
+ // 13 <param name="images">0</param>
+ // 14 <param name="components">
+ // <component stream="1" type="1" language="dut" description="4:3"/ >
+ // <component stream="2" type="1" language="dut" description=""/ ></param>
+ // 15 <param name="contents">
+ // 16 <content name="Soap/Melodrama/Folkloric"/ ></param>
+ // 17 <param name="raw_contents"><raw_content name="21"/ ></param>
+ // 18 <param name="timer_exists">false</param>
+ // 19 <param name="timer_active">false</param>
+ // 20 <param name="timer_id"/ >
+ // </event>
+*/
+
+ recTitl[i] = x[i].getElementsByTagName("param")[1].childNodes[0].nodeValue;
+ try {
+ recDesc[i] = x[i].getElementsByTagName("param")[3].childNodes[0].nodeValue;
+ } catch(e) {
+ recDesc[i] = "";
+ }
+ recDura[i] = x[i].getElementsByTagName("param")[7].childNodes[0].nodeValue;
+ recStrt[i] = x[i].getElementsByTagName("param")[6].childNodes[0].nodeValue;
+ recChan[i] = currChan + "\uE003-\uE003" + channelsnames[currChan];
+ recGUID[i] = x[i].getElementsByTagName("param")[0].childNodes[0].nodeValue;
+
+ date = new Date(Number(recStrt[i])*1000);
+ year = date.getFullYear();
+ month = date.getMonth();
+ d = date.getDate();
+ day = date.getDay();
+ h = date.getHours();
+ m = date.getMinutes();
+ h=addzero(h);
+ m=addzero(m);
+ recList[i] = ''+days[day]+' '+d+' '+months[month]+' '+year+' '+h+':'+m + " " + recTitl[i];
+
+ }
+ getRecOK = 2;
+ } catch(e) {
+ alert("Get EPG problem: " + e);
+ getRecOK = 0;
+ medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[50] + "</center><pre>\n\n\n" + Lang[51] + "</pre></h1>";
+ }
+}
+
+function getSchedule(schchan){
+ SI = "";
+ recTitl.length = 0;
+ nrMedia = 0;
+ try {
+ StreamInfo(schchan);
+
+ eitService = toi.statics.ToiDvbEitCacheServiceItem.create(SI[1],SI[2],SI[3]);
+ eitCache.addService(eitService);
+ event = eitCache.getPresentEvent(eitService);
+ events = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000);
+
+ if (event.name) {
+ if (events.more) {
+ var t = eitCache.getEvents(eitService, (Math.round(new Date().getTime()/1000.0)), 2000000000);
+ events.infoSequence.concat(t.infoSequence);
+ events.more = t.more;
+ }
+ nrMedia = events.infoSequence.length - 1;
+ for (var i = 0; i < events.infoSequence.length; i++) {
+
+ // Double info or scrollbar twice on the screen if nrMedia < 14
+ while ((i > 0) && (events.infoSequence[i].eventId == events.infoSequence[(i-1)].eventId) && (nrMedia > 14)) {
+ recList[i] = "";
+ i += 1;
+ }
+
+ recTitl[i] = events.infoSequence[i].name;
+ recDesc[i] = eitCache.getExtendedEventInfo(eitService,events.infoSequence[i].eventId).extendedInfo;
+ if (recDesc[i] == "" ) { recDesc[i] = eitCache.getExtendedEventInfo(eitService,events.infoSequence[i].eventId).shortInfo;}
+ recDura[i] = events.infoSequence[i].duration;
+ recStrt[i] = events.infoSequence[i].time;
+ recChan[i] = schchan + "\uE003-\uE003" + channelsnames[schchan];
+ recGUID[i] = events.infoSequence[i].eventId;
+
+ date = new Date(Number(recStrt[i])*1000);
+ year = date.getFullYear();
+ month = date.getMonth();
+ d = date.getDate();
+ day = date.getDay();
+ h = date.getHours();
+ m = date.getMinutes();
+ h=addzero(h);
+ m=addzero(m);
+ recList[i] = ' ' + days[day] + ' ' + d + ' ' + months[month] + ' ' + year + " " + h + ":" + m + " (" + (recDura[i]/60).toFixed(0) + ") " + Left(recTitl[i],30);
+ }
+ getRecOK = 2;
+ } else {
+ getRecOK = 0;
+
+ medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[11] + "</center><pre>\n\n\n" + Lang[52] + "</pre></h1>";
+
+ if (experimental) {
+ medialist.innerHTML += "<img src='" + channels[schchan] + ".jpg' style='width:100%; position:absolute; left:0%; top:-11%;'>";
+ }
+
+ }
+ } catch(e) {
+ getRecOK = 0;
+ medialist.innerHTML = "<h1><center style='font-size:" + fsRec + ";" + color_main_head + ";'>" + Lang[11] + "</center><pre>\n\n\n" + Lang[53] + "</pre></h1>";
+ }
+
+}
+
+
+
+function incMed(step) {
+ currMed += step;
+ if (currMed > nrMedia ) {
+ currMed = 0;
+ }
+}
+
+function decMed(step) {
+ currMed -= step;
+ if (currMed < 0) {
+ currMed = nrMedia;
+ }
+}
+
+function playRec(uri,posrec) {
+ try {
+ if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
+ mediaPlayer.close();
+ }
+ if (osdepginfo.style.opacity == 1) {osdepginfo.style.opacity = 0;}
+ mediaPlayer.open(uri);
+ if (posrec) {
+ mediaPlayer.playFromPosition(posrec,1000);
+ } else {
+ mediaPlayer.play(1000);
+ }
+ showDisplay("PLAY", false, 100, 0 );
+ } catch (e) {
+ alert("Failed opening recording: " + e);
+ return;
+ }
+}
+
+
+function pauseRec(uri) {
+ try {
+ if (mediaPlayer.getState() != mediaPlayer.STATE_IDLE) {
+ mediaPlayer.close();
+ }
+ if (osdepginfo.style.opacity == 1) {osdepginfo.style.opacity = 0;}
+ mediaPlayer.open(uri);
+ mediaPlayer.play(0);
+ showDisplay("PAUS", false, 100, 0 );
+ } catch (e) {
+ alert("Failed opening recording: " + e);
+ return;
+ }
+}
+
+
+
+function createNewAsset() {
+ try {
+ assetId = ams.createAsset(ams.ASSET_PVR);
+// alert("Created " + assetId);
+ } catch(e) {
+ alert("Couldn't create asset: " + e);
+ }
+}
+
+function onStateChanged(ev) {
+// alert("Media player state changed: state=" + ev.state + ", reason=" + ev.reason + ", code=" + ev.code);
+
+ if ( ( ev.state == 6 && ev.reason == "HostUnreachable" ) || ( ev.state == 2 && ev.reason == "PositionEnd" )) {
+ BackToTV();
+ }
+
+}
+
+// Start recording/ timeshift
+
+function ServerRecordStart() {
+//Record current program
+
+ try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + recServ + "/addTimer?guid=" + channels[currChan] + "&" + new Date().getTime() ),false);
+ xmlhttp.send();
+
+ if (xmlhttp.responseXML == null) {
+ //settimer(EPG[NowNext][2][currChan],Lang[55],0,2);
+ //Timer not set, try direct recording
+ ServerRecord();
+ settimer(0,Lang[57],0,2);
+ } else {
+ settimer(EPG[NowNext][2][currChan],EPG[NowNext][1][currChan],0,2);
+ }
+
+ } catch(e) {
+ alert("Sending Timers to server problem: " + e);
+ settimer(0,Lang[55],0,2,ErrorColor);
+ }
+
+}
+
+
+function ServerRecord() {
+//Instant record on server
+
+ try {
+ xmlhttp=new XMLHttpRequest();
+ //switch server to current channel
+ xmlhttp.open("POST",(server_ip + RestFulAPI + "/remote/switch/" + channels[currChan]),true);
+ xmlhttp.send();
+ //start recording
+ setTimeout("xmlhttp.open('POST',(server_ip + RestFulAPI + '/remote/Record'),false);xmlhttp.send();",5000);
+ } catch(e) {
+ alert("Sending key to server problem: " + e);
+ settimer(0,Lang[55],0,2,ErrorColor);
+ }
+
+//end of function
+}
+
+
+
+function ServerPause() {
+//Instant pause on server
+ ServerRecord();
+ settimer(EPG[NowNext][2][currChan],Lang[70],0,2);
+ setTimeout("getPauseFile();",6000);
+//end of function
+}
+
+
+
+
+function getPauseFile() {
+
+try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + RestFulAPI + "/recordings.xml?" + new Date().getTime()),false);
+ xmlhttp.send();
+ xmlDoc=xmlhttp.responseXML;
+ var x=xmlDoc.getElementsByTagName("recording");
+ nrMedia = x.length - 1;
+ for (var i=0;i<x.length;i++)
+ {
+ var xx = x[i].getElementsByTagName("param")[2].childNodes[0].nodeValue.split(".");
+ xx = xx[(xx.length-2)].split("-");
+
+ if ( xx[0] == currChan ) {
+ recLink[0] = server_ip + recServ + x[i].getElementsByTagName("param")[2].childNodes[0].nodeValue;
+ }
+
+ }
+
+ } catch(e) {
+ alert("Get Recordings problem: " + e);
+ }
+ getRecOK = 0;
+ recDura[0] = 0; // 3600;// set to 1 hour
+ LoadMediaSettings();// sets currMed to 0
+ recTitl[0] = "Time Shift File"
+ position = 0;
+ pauseRec(recLink[0]);
+
+}
+
+
+
+function ServerTimer(guid,evid) {
+
+try {
+ xmlhttp=new XMLHttpRequest();
+ xmlhttp.open("GET",(server_ip + recServ + "/addTimer?guid=" + guid + "&evid=" + evid + "&" + new Date().getTime() ),false);
+ xmlhttp.send();
+ } catch(e) {
+ alert("Sending Timers to server problem: " + e);
+ }
+
+
+}
+
+
+
+function BackToTV() {
+ play(channels[currChan]);
+ if (isPause == 1 || localRecording == 1) {
+ UnloadMediaSettings();
+ } else {
+ medialist.style.opacity = 0.9;
+ showDisplay("STOP", false, 100, 0 );
+ showMediaList();
+ AvInfo.length = 0;
+ }
+}
+
+
+function onRecorderStateChanged(event) {
+// alert("EVENT! " + event.reason + " *** " + event.state);
+ RECicon = "\uE003"; // 0xE003 0x83 Fixed width blank
+ switch (event.state) {
+ case mediaRecorder.STATE_IDLE:
+ // "STATE_IDLE";
+ break;
+ case mediaRecorder.STATE_CONNECTING:
+ // "STATE_CONNECTING";
+ break;
+ case mediaRecorder.STATE_PAUSED:
+ // "STATE_PAUSED";
+ break;
+ case mediaRecorder.STATE_RECORDING:
+ // "STATE_RECORDING";
+ RECicon = "\uE00B"; // 0xE00B 0x8B REC
+ break;
+ case mediaRecorder.STATE_FAILED:
+ // "STATE_FAILED";
+ RECicon = "\uE01A"; // Bomb Icoon
+ break;
+ }
+
+}
+
+function ShowMediaOSD() {
+if (get_recordings == 1) {
+ // Display Name/ length
+ var pos = position + (mediaPlayer.getPosition()/1000);
+ var pos2 = (pos / Number(recDura[currMed])) * 100;
+ if (pos2 < 1) { pos2 = 1;}
+ if (pos2 >100) {pos2 = 100;} // in case of viewing while still recording.
+ if (pos>recMark[posMark] && recMark.length-1>posMark) { posMark += 1;}
+ pos2 = ((pos2 * 140) / 100).toFixed(0); // make it 40% bigger
+ var pos5 = "\uE007" + new Array(pos2 - 1).join("\uE008") + new Array(140 - pos2).join("\uE009") + "\uE00A"
+ var pos4 = "";
+ var pos6 = pos5;
+ var fontc = color_progress1;
+ var x = 0;
+ for (var i=0; i<recMark.length; i++) {
+ var pos3 = recMark[i] / Number(recDura[currMed]) * 100;
+ pos3 = ((pos3 * 140) / 100).toFixed(0); // make it 40% bigger
+ pos4 += fontc + Left(pos6,pos3 - x);
+ if (fontc == "</font>" + color_progress2) { fontc = "</font>" + color_progress1; } else { fontc = "</font>" + color_progress2;}
+ x = pos3;
+ pos6 = Right(pos5,140 - pos3);
+ }
+ pos4 += "</font>" + color_progress1 + pos6 + "</font>";
+ var x = (Number(recDura[currMed])/60).toFixed(0);
+ if (pos/60 > x) { x = (pos/60).toFixed(0);}
+ date_time();
+ osdtime.innerHTML = result;
+ date_time_rec();
+ osdmedia.innerHTML = "<pre style='" + color_media_osd + ";font-size:" + fsMedia +";'> \n " + (pos/60).toFixed(0) + " / " + x + " " + Left(recTitl[currMed],40) + "\n " + pos4 + "\n " + result + " </pre>";
+} else if ( get_recordings == 2) {
+ var pos = position + (mediaPlayer.getPosition()/1000);
+ date_time();
+ osdtime.innerHTML = result;
+ osdmedia.innerHTML = "<pre style='" + color_media_osd + ";font-size:" + fsMedia +";'> \n " + (pos/60).toFixed(0) + " \n " + Left(recTitl[currMed],40) + "\n \n " + recStrt[currMed] + " </pre>";
+}
+}
+
+function ShowInfo() {
+//Like Show EPG Info
+ if ( medialist.style.opacity == 0 ) { updateStreamInfo(currMed);} else { AvInfo[currMed] = "";}
+ if (get_recordings == 2) {
+ result = recStrt[currMed]
+ osdepginfo.innerHTML = "<center><pre style='" + color_epg_head + ";'>" + Left(recTitl[currMed],60)
+ + "\n </pre><p style='" + color_epg_avinfo + ";'>" + AvInfo[currMed]
+ + "</p><pre style='" + color_epg_title + ";'> " + result + "\n "
+ + "???" + Lang[54]
+ + "</pre><p style='" + color_epg_info + ";'> Sorry STREAMDEV-plugin : " + Lang[37] + "</p></center>";
+ } else {
+ date = new Date(Number(recStrt[currMed])*1000);
+ year = date.getFullYear();
+ month = date.getMonth();
+ d = date.getDate();
+ day = date.getDay();
+ h = date.getHours();
+ m = date.getMinutes();
+ h = addzero(h);
+ m = addzero(m);
+ result = '' + days[day] + ' ' + d + ' ' + months[month] + ' ' + year + ' ' + h + ':' + m;
+
+ if (year!==1970) {
+ osdepginfo.innerHTML = "<center><pre style='" + color_epg_head + ";'>" + Left(recTitl[currMed],60)
+ + "</pre><p style='" + color_epg_avinfo + ";'>" + AvInfo[currMed]
+ + "</p><pre style='" + color_epg_title + ";'> " + result + "\n "
+ + (recDura[currMed] / 60).toFixed(0) + Lang[54] + "\n " + recChan[currMed] + " "
+ + "\n </pre><p style='" + color_epg_info + ";'>" + Left(recDesc[currMed],750) + "</p></center>";
+ } else {
+ //info for non-vdr recordings
+ osdepginfo.innerHTML = "<center><pre style='" + color_epg_head + ";'>" + Left(recTitl[currMed],60)
+ + "\n </pre><p style='" + color_epg_avinfo + ";'>" + AvInfo[currMed] + " " + "\n \n </p></center>";
+ }
+ }
+}
+
+function onScheduledStart(event) {
+ // event is of type ToiSchedulerServiceBooking, see docs
+ var timertype = event.booking.category;
+
+ if ( timertype == "SwitchOnly") {
+ ClearScreen();
+ isFullscreen = 1; FullScreen();
+ isVisible = 0; setVisible(isVisible);
+
+ //Switch from recordings
+ if (isMediaMenu) {
+ if (medialist.style.opacity == 0) {setResume();} // No mediamenu on screen so set resume.
+ UnloadMediaSettings();
+ }
+
+ prevChan = currChan;
+ currChan = Number(ss.getParameter(event.booking.id, "Channel"));
+ ChanGroup = Number(Left((currChan / 1000),1));
+
+ // check if Group isn't protected
+ if ((protChn[ChanGroup] == 1) && (ShowProtectedChannels == 1)) {
+ currChan = prevChan;
+ ChanGroup = Number(Left((currChan / 1000),1));
+ }
+
+ // switch only if not already on that channel.
+ if (currChan !== prevChan) {
+ play(channels[currChan]);
+ }
+ ss.remove(event.booking.id);
+ setOSDtimer();
+ } else {
+ try {
+ createNewAsset();
+
+ var recChannr = Number(ss.getParameter(event.booking.id, "Channel"));
+ var recGroup = Number(Left((recChannr / 1000),1));
+ var recChan = 0;
+ if (ServerAdres[recGroup] == "MultiCast" ) {
+ SI=channels[recChannr].split("-");
+ recChan = SI[4];
+ } else {
+ recChan = ServerAdres[recGroup] + channels[recChannr];
+ }
+
+ mediaRecorder.open(recChan, assetId);
+
+ var propList = new Array(ams.PROPERTY_SYSTEM_PLAYBACKURI);
+ var properties = ams.getProperties(assetId, propList);
+ var assetURI = properties[0].value;
+
+ // save the assetId in the booking
+ ss.setParameter(event.booking.id, "assetURI", assetURI);
+ ss.setParameter(event.booking.id, "assetId", assetId);
+ ss.setParameter(event.booking.id, "active", "True");
+ ss.setParameter(event.booking.id, "Type", "\uE00B");
+
+ mediaRecorder.record();
+// alert("Recording to " + assetURI);
+ }
+ catch (e) {
+ alert(e);
+ }
+ }
+}
+
+
+function onScheduledStop(event) {
+ var timertype = event.booking.category;
+ if ( timertype == "SwitchOnly") {
+ ss.remove(event.booking.id);
+ setOSDtimer();
+ } else {
+ try {
+ ss.setParameter(event.booking.id, "active", "False");
+ ss.setParameter(event.booking.id, "Type", "\uE01C");
+ mediaRecorder.close();
+ }
+ catch (e) {
+ alert(e);
+ }
+ }
+
+}
+
+
+function ClearScreen() {
+ isSchedule = 0; schedule.style.opacity = 0;
+ isSetupMenu = 0;
+ epgactive = 0;
+ osdepginfonext.style.opacity = 0;
+ osdepginfo.style.opacity = 0;
+ mainmenu.style.opacity = 0;
+}
+
diff --git a/settings.js b/settings.js
index b0841ff..8ebf268 100644
--- a/settings.js
+++ b/settings.js
@@ -2,7 +2,7 @@
// Default settings
//
-var Version = "0.26.2";
+var Version = "0.26.3";
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");
@@ -71,19 +71,25 @@ var afterRecTime = 600 ; // for local recordings time after recording in seconds
var color_bg = "#fc5";
var color_main_head = "color:white";
var color_main_font = "color:black";
+//var color_main_font = "color:lightgreen";
var color_epg_head = "color:white";
var color_epg_title = "color:white";
var color_epg_avinfo = "color:black";
+//var color_epg_avinfo = "color:lightgreen";
var color_epg_info = "color:yellow";
var color_sched_head = "color:white";
var color_sched_font = "color:black";
+//var color_sched_font = "color:lightgreen";
var color_chan_epg = "color:black";
+//var color_chan_epg = "color:lightgreen";
var color_osdtimer = "color:black";
+//var color_osdtimer = "color:lightgreen";
var color_timerinfo = "color:white";
var color_media_osd = "color:white";
var color_progress1 = "<font color=red>";
var color_progress2 = "<font color=white>";
-var color_notset = "color:grey";
+var color_notset = "color:grey"
+//var color_notset = "color:black";
var color_switchtimer = "#660066";
var DefaultBGColor = "green";
var ErrorColor = "red";