From 89ed0dc6d9e3cccb640d445d94de3ec67e89a7fd Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Sun, 16 May 2021 22:47:10 +0200 Subject: [PATCH] - yweb: fix mess around remote controls by using varables this allows to sort the options in rc-selection nicely Conflicts: data/y-web/Y_Blocks.txt data/y-web/Y_Version.txt Signed-off-by: Thilo Graf --- data/y-web/Y_Blocks.txt | 143 ++++++++++++++++++++------------ data/y-web/Y_Settings_yWeb.yhtm | 91 +++++++------------- data/y-web/Y_Version.txt | 6 +- 3 files changed, 122 insertions(+), 118 deletions(-) diff --git a/data/y-web/Y_Blocks.txt b/data/y-web/Y_Blocks.txt index 78089e3b3..17b2f0f32 100644 --- a/data/y-web/Y_Blocks.txt +++ b/data/y-web/Y_Blocks.txt @@ -517,69 +517,104 @@ start-block~frame_live_epg end-block~frame_live_epg +# ------- Remote control variables +start-block~rc_variables +{=var-set:_fb_dbox_philips=2=} +{=var-set:_fb_dbox_nokia_old=1=} +{=var-set:_fb_auto=0=} + +{=var-set:_rc_dbox_philips=-2=} +{=var-set:_rc_dbox_nokia_old=-1=} +{=var-set:_rc_auto=0=} +{=var-set:_rc_cst_neo=1=} +{=var-set:_rc_cst_zee=2=} +{=var-set:_rc_cst_neo2=3=} +{=var-set:_rc_cst_tank=4=} +{=var-set:_rc_cst_trinity=5=} +{=var-set:_rc_cst_zee2=6=} +{=var-set:_rc_cst_link=7=} +{=var-set:_rc_cst_trinity_duo=8=} +{=var-set:_rc_ax_hd51=9=} +{=var-set:_rc_mutant_hd51=10=} +{=var-set:_rc_wwio_breeze4k=11=} +{=var-set:_rc_vuplus_solo4k=12=} +{=var-set:_rc_vuplus_duo4k=13=} +{=var-set:_rc_vuplus_duo4kse=14=} +{=var-set:_rc_vuplus_ultimo4k=15=} +{=var-set:_rc_vuplus_uno4k=16=} +{=var-set:_rc_vuplus_uno4kse=17=} +{=var-set:_rc_vuplus_zero4k=18=} +{=var-set:_rc_vuplus_duo=19=} +{=var-set:_rc_zgemma_h7=20=} +{=var-set:_rc_ax_hd60=21=} +{=var-set:_rc_mutant_hd60=22=} +{=var-set:_rc_ax_hd61=23=} +end-block~rc_variables + # ------- Remote start-block~remote -{=var-set:nfbtype={=ini-get:/var/tuxbox/config/neutrino.conf;remote_control_hardware=}=} -{=var-set:yfbtype={=ini-get:/var/tuxbox/config/Y-Web.conf;fb;0=}=} +{=include-block:Y_Blocks.txt;rc_variables=} +{=var-set:nfbtype={=ini-get:%(CONFIGDIR)/neutrino.conf;remote_control_hardware=}=} +{=var-set:yfbtype={=ini-get:%(CONFIGDIR)/Y-Web.conf;fb;0=}=} {=var-set:boxtype={=func:get_boxtype=}=} -{=if-equal:{=var-get:yfbtype=}~0~ - {=if-equal:{=var-get:nfbtype=}~2~ {=include-block:Y_Blocks.txt;rc_dbox_philips=}~ - {=if-equal:{=var-get:nfbtype=}~1~ {=include-block:Y_Blocks.txt;rc_dbox_nokia_old=}~ - {=if-equal:{=var-get:boxtype=}~CST Neo~ {=include-block:Y_Blocks.txt;rc_cst_v2=}~ - {=if-equal:{=var-get:boxtype=}~CST Zee~ {=include-block:Y_Blocks.txt;rc_cst_v3=}~ - {=if-equal:{=var-get:boxtype=}~CST Neo Twin~ {=include-block:Y_Blocks.txt;rc_cst_v4=}~ - {=if-equal:{=var-get:boxtype=}~CST Tank~ {=include-block:Y_Blocks.txt;rc_cst_v5=}~ - {=if-equal:{=var-get:boxtype=}~CST Trinity~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~ - {=if-equal:{=var-get:boxtype=}~CST Zee2~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~ - {=if-equal:{=var-get:boxtype=}~CST Link~ {=include-block:Y_Blocks.txt;rc_cst_v4=}~ - {=if-equal:{=var-get:boxtype=}~CST Trinity Duo~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~ - {=if-equal:{=var-get:boxtype=}~AX-Technologies HD51~{=include-block:Y_Blocks.txt;rc_ax_hd51=}~ - {=if-equal:{=var-get:boxtype=}~Mutant HD51~ {=include-block:Y_Blocks.txt;rc_mutant_hd51=}~ - {=if-equal:{=var-get:boxtype=}~WWIO BRE2ZE 4K~ {=include-block:Y_Blocks.txt;rc_wwio_bre2ze4k=}~ - {=if-equal:{=var-get:boxtype=}~VU+ SOLO4K~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:boxtype=}~VU+ DUO4K~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:boxtype=}~VU+ DUO4KSE~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:boxtype=}~VU+ ULTIMO4K~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:boxtype=}~VU+ UNO4K~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:boxtype=}~VU+ UNO4KSE~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:boxtype=}~VU+ ZERO4K~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:boxtype=}~VU+ DUO~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ +{=if-equal:{=var-get:yfbtype=}~{=var-get:_fb_auto=}~ + {=if-equal:{=var-get:nfbtype=}~{=var-get:_fb_dbox_philips=}~ {=include-block:Y_Blocks.txt;rc_dbox_philips=}~ + {=if-equal:{=var-get:nfbtype=}~{=var-get:_fb_dbox_nokia_old=}~ {=include-block:Y_Blocks.txt;rc_dbox_nokia_old=}~ + {=if-equal:{=var-get:boxtype=}~CST Neo~ {=include-block:Y_Blocks.txt;rc_cst_v2=}~ + {=if-equal:{=var-get:boxtype=}~CST Zee~ {=include-block:Y_Blocks.txt;rc_cst_v3=}~ + {=if-equal:{=var-get:boxtype=}~CST Neo Twin~ {=include-block:Y_Blocks.txt;rc_cst_v4=}~ + {=if-equal:{=var-get:boxtype=}~CST Tank~ {=include-block:Y_Blocks.txt;rc_cst_v5=}~ + {=if-equal:{=var-get:boxtype=}~CST Trinity~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~ + {=if-equal:{=var-get:boxtype=}~CST Zee2~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~ + {=if-equal:{=var-get:boxtype=}~CST Link~ {=include-block:Y_Blocks.txt;rc_cst_v4=}~ + {=if-equal:{=var-get:boxtype=}~CST Trinity Duo~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~ + {=if-equal:{=var-get:boxtype=}~AX-Technologies HD51~ {=include-block:Y_Blocks.txt;rc_ax_hd51=}~ + {=if-equal:{=var-get:boxtype=}~Mutant HD51~ {=include-block:Y_Blocks.txt;rc_mutant_hd51=}~ + {=if-equal:{=var-get:boxtype=}~WWIO BRE2ZE 4K~ {=include-block:Y_Blocks.txt;rc_wwio_bre2ze4k=}~ + {=if-equal:{=var-get:boxtype=}~VU+ SOLO4K~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:boxtype=}~VU+ DUO4K~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:boxtype=}~VU+ DUO4KSE~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:boxtype=}~VU+ ULTIMO4K~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:boxtype=}~VU+ UNO4K~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:boxtype=}~VU+ UNO4KSE~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:boxtype=}~VU+ ZERO4K~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:boxtype=}~VU+ DUO~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ {=if-equal:{=var-get:boxtype=}~AirDigital Zgemma H7C/S~ {=include-block:Y_Blocks.txt;rc_zgemma_h7=}~ - {=if-equal:{=var-get:boxtype=}~AX-Technologies HD60~{=include-block:Y_Blocks.txt;rc_ax_hd51=}~ - {=if-equal:{=var-get:boxtype=}~Mutant HD60~ {=include-block:Y_Blocks.txt;rc_mutant_hd60=}~ - {=if-equal:{=var-get:boxtype=}~AX-Technologies HD61~{=include-block:Y_Blocks.txt;rc_ax_hd61=}~ + {=if-equal:{=var-get:boxtype=}~AX-Technologies HD60~ {=include-block:Y_Blocks.txt;rc_ax_hd51=}~ + {=if-equal:{=var-get:boxtype=}~Mutant HD60~ {=include-block:Y_Blocks.txt;rc_mutant_hd60=}~ + {=if-equal:{=var-get:boxtype=}~AX-Technologies HD61~ {=include-block:Y_Blocks.txt;rc_ax_hd61=}~ - {=comment:fallback~=} {=include-block:Y_Blocks.txt;rc_cst_v1=} + {=comment:fallback~=} {=include-block:Y_Blocks.txt;rc_cst_v1=} =}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=} =}=} ~ - {=if-equal:{=var-get:yfbtype=}~-2~ {=include-block:Y_Blocks.txt;rc_dbox_philips=}~ - {=if-equal:{=var-get:yfbtype=}~-1~ {=include-block:Y_Blocks.txt;rc_dbox_nokia_old=}~ - {=if-equal:{=var-get:yfbtype=}~1~ {=include-block:Y_Blocks.txt;rc_cst_v1=}~ - {=if-equal:{=var-get:yfbtype=}~2~ {=include-block:Y_Blocks.txt;rc_cst_v2=}~ - {=if-equal:{=var-get:yfbtype=}~3~ {=include-block:Y_Blocks.txt;rc_cst_v3=}~ - {=if-equal:{=var-get:yfbtype=}~4~ {=include-block:Y_Blocks.txt;rc_cst_v4=}~ - {=if-equal:{=var-get:yfbtype=}~5~ {=include-block:Y_Blocks.txt;rc_cst_v5=}~ - {=if-equal:{=var-get:yfbtype=}~6~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~ - {=if-equal:{=var-get:yfbtype=}~7~ {=include-block:Y_Blocks.txt;rc_cst_v4=}~ - {=if-equal:{=var-get:yfbtype=}~8~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~ - {=if-equal:{=var-get:yfbtype=}~9~ {=include-block:Y_Blocks.txt;rc_ax_hd51=}~ - {=if-equal:{=var-get:yfbtype=}~10~ {=include-block:Y_Blocks.txt;rc_mutant_hd51=}~ - {=if-equal:{=var-get:yfbtype=}~11~ {=include-block:Y_Blocks.txt;rc_wwio_bre2ze4k=}~ - {=if-equal:{=var-get:yfbtype=}~12~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:yfbtype=}~13~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:yfbtype=}~14~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:yfbtype=}~15~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:yfbtype=}~16~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:yfbtype=}~17~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:yfbtype=}~18~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:yfbtype=}~19~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ - {=if-equal:{=var-get:yfbtype=}~20~ {=include-block:Y_Blocks.txt;rc_zgemma_h7=}~ - {=if-equal:{=var-get:yfbtype=}~21~ {=include-block:Y_Blocks.txt;rc_ax_hd51=}~ - {=if-equal:{=var-get:yfbtype=}~22~ {=include-block:Y_Blocks.txt;rc_mutant_hd60=}~ - {=if-equal:{=var-get:yfbtype=}~23~ {=include-block:Y_Blocks.txt;rc_ax_hd61=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_dbox_philips=}~ {=include-block:Y_Blocks.txt;rc_dbox_philips=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_dbox_nokia_old=}~ {=include-block:Y_Blocks.txt;rc_dbox_nokia_old=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_cst_neo=}~ {=include-block:Y_Blocks.txt;rc_cst_v1=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_cst_zee=}~ {=include-block:Y_Blocks.txt;rc_cst_v2=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_cst_neo2=}~ {=include-block:Y_Blocks.txt;rc_cst_v3=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_cst_tank=}~ {=include-block:Y_Blocks.txt;rc_cst_v4=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_cst_trinity=}~ {=include-block:Y_Blocks.txt;rc_cst_v5=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_cst_zee2=}~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_cst_link=}~ {=include-block:Y_Blocks.txt;rc_cst_v4=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_cst_trinity_duo=}~ {=include-block:Y_Blocks.txt;rc_cst_v6=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_ax_hd51=}~ {=include-block:Y_Blocks.txt;rc_ax_hd51=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_mutant_hd51=}~ {=include-block:Y_Blocks.txt;rc_mutant_hd51=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_wwio_breeze4k=}~ {=include-block:Y_Blocks.txt;rc_wwio_bre2ze4k=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_vuplus_solo4k=}~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_vuplus_duo4k=}~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_vuplus_duo4kse=}~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_vuplus_ultimo4k=}~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_vuplus_uno4k=}~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_vuplus_uno4kse=}~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_vuplus_zero4k=}~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_vuplus_duo=}~ {=include-block:Y_Blocks.txt;rc_vuplus=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_zgemma_h7=}~ {=include-block:Y_Blocks.txt;rc_zgemma_h7=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_ax_hd60=}~ {=include-block:Y_Blocks.txt;rc_ax_hd51=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_mutant_hd60=}~ {=include-block:Y_Blocks.txt;rc_mutant_hd60=}~ + {=if-equal:{=var-get:yfbtype=}~{=var-get:_rc_ax_hd61=}~ {=include-block:Y_Blocks.txt;rc_ax_hd61=}~ - {=comment:fallback~=} {=include-block:Y_Blocks.txt;rc_cst_v1=} + {=comment:fallback~=} {=include-block:Y_Blocks.txt;rc_cst_v1=} =}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=}=} =} end-block~remote diff --git a/data/y-web/Y_Settings_yWeb.yhtm b/data/y-web/Y_Settings_yWeb.yhtm index 5a4e606ed..43b1febd0 100644 --- a/data/y-web/Y_Settings_yWeb.yhtm +++ b/data/y-web/Y_Settings_yWeb.yhtm @@ -1,3 +1,4 @@ +{=include-block:Y_Blocks.txt;rc_variables=} {=include-block:Y_Blocks.txt;management_check_top=} {=include-block:Y_Blocks.txt;head=} @@ -26,45 +27,13 @@ function do_submit(){ } } function do_init(){ - val = "{=ini-get:%(CONFIGDIR)/Y-Web.conf;fb;0~open=}"; - var sel=2; - switch(val){ - case "-2": // d-box philips - case "-1": // d-box nokia old - case "0": // auto - case "1": // cst hd1/bse - case "2": // cst neo - case "3": // cst zee/neo2 - case "4": // cst neo twin - case "5": // cst tank - case "6": // cst trinity - case "7": // cst link - case "8": // cst trinity duo - case "9": // ax hd51 - case "10": // mutant hd51 - case "11": // wwio bre2ze4k - case "12": // vu solo4k - case "13": // vu duo4k - case "14": // vu duo4kse - case "15": // vu ultimo4k - case "16": // vu uno4k - case "17": // vu uno4kse - case "18": // vu zero4k - case "19": // vu duo - case "20": // zgemma h7 - case "21": // ax hd60 - case "22": // mutant hd60 - case "23": // ax hd61 - sel=(sel*1+val*1); - break; - default: - break; - } - document.f.fb.selectedIndex = sel; + var val = "{=ini-get:/var/tuxbox/config/Y-Web.conf;fb;0~open=}"; var cst = (loadSyncURL("/control/info?hwinfo").indexOf("CST") > -1); var fb_options = document.f.fb.getElementsByTagName("option"); for (var i = 0; i < fb_options.length; i++) { + if (fb_options[i].value == val) + document.f.fb.selectedIndex = i; if (cst && i > 2+8) fb_options[i].disabled = true; } @@ -168,32 +137,32 @@ select { {=L:set.yweb.remote=} {=L:set.yweb.screenshot_rc=} diff --git a/data/y-web/Y_Version.txt b/data/y-web/Y_Version.txt index a7b6a5c65..791a8ae8e 100644 --- a/data/y-web/Y_Version.txt +++ b/data/y-web/Y_Version.txt @@ -1,4 +1,4 @@ -version=2.9.0.44 -date=27.10.2019 +version=2.9.0.50 +date=16.05.2021 +info=Tuxbox-Neutrino type=Release -info=Port Tuxbox-Neutrino