From 4611381dba5c54d7f562fe7eac06e4f884d01624 Mon Sep 17 00:00:00 2001 From: pQu4k3r Date: Tue, 21 Jul 2026 22:21:34 +0000 Subject: [PATCH 1/3] Fix Script Installer: remote entries could no longer run The dynamic-scripts refactor routed commands with url.startswith("http"), but remote entries are complete command lines starting with "wget ..." or "opkg ...", so every one of them fell into the sh "" branch and sh tried to open the command line as a file ("cannot open wget -q ..."). Route on what actually distinguishes the two kinds: local scripts are absolute paths. Also sort the dynamic sh/ listing (listdir order is filesystem dependent, so the tiles appeared in random order) and drop the unused 'icon' assignment that was failing the ruff workflow (F841). --- .../Plugins/Extensions/LinuxsatPanel/plugin.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/plugin.py b/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/plugin.py index 1dc8246..efb7137 100644 --- a/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/plugin.py +++ b/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/plugin.py @@ -2466,11 +2466,10 @@ def __init__(self, session, name): # local script in folder /sh sh_dir = plugin_path + "/sh" if exists(sh_dir): - for filename in listdir(sh_dir): + for filename in sorted(listdir(sh_dir)): if filename.endswith(".sh"): base_name = filename[:-3] title = base_name.replace('_', ' ').title() - icon = picfold + "script.png" script_path = join(sh_dir, filename) add_menu_item(menu_list, self.titles, self.pics, self.urls, title, "script.png", script_path) @@ -2584,10 +2583,13 @@ def okClicked(self, answer=False): "source"] lower_namev = self.namev.lower() keyword_found = any(keyword in lower_namev for keyword in keywords) - if self.url.startswith("http"): - cmd = str(self.url) + " > %s 2>&1" % file_log - else: + if self.url.startswith("/"): + # local script from the sh/ folder cmd = 'sh "{}" > {} 2>&1'.format(self.url, file_log) + else: + # remote entries are complete command lines (wget ... | sh, + # opkg ...) and must run as-is + cmd = str(self.url) + " > %s 2>&1" % file_log if keyword_found: self.session.open( lsConsole, From 28700d06e6e841c0f1ead9e34c943c0f90d667f6 Mon Sep 17 00:00:00 2001 From: pQu4k3r Date: Tue, 21 Jul 2026 22:21:35 +0000 Subject: [PATCH 2/3] Make translate_utils importable; File_Commander polish translate_utils.py expects DEBUG, HEADERS and SYSTEM_DIR from the package but they were never defined, so the module could not be imported at all. Define them in __init__.py (HEADERS reuses the plugin's User-Agent, SYSTEM_DIR is the plugin directory where translation_cache.json already lives). File_Commander: use the plugin's gettext catalog so the button labels are translated again, and remove the dead title ternary that compared a constant against a different constant. --- .../python/Plugins/Extensions/LinuxsatPanel/__init__.py | 4 ++++ .../Extensions/LinuxsatPanel/addons/File_Commander.py | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/__init__.py b/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/__init__.py index 5f8311d..b846a8e 100644 --- a/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/__init__.py +++ b/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/__init__.py @@ -75,6 +75,10 @@ def check_and_install_requests(): PluginLanguagePath = 'Extensions/LinuxsatPanel/locale' plugin_path = dirname(sys.modules[__name__].__file__) AgentRequest = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.3' +# used by translate_utils +DEBUG = False +HEADERS = {"User-Agent": AgentRequest} +SYSTEM_DIR = plugin_path infourl = 'https://raw.githubusercontent.com/Belfagor2005/upload/main/fill/info.txt' abouturl = 'https://raw.githubusercontent.com/Belfagor2005/upload/main/fill/about.txt' xmlurl = 'https://raw.githubusercontent.com/Belfagor2005/upload/main/fill/addons_2024.xml' diff --git a/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/addons/File_Commander.py b/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/addons/File_Commander.py index 17f5071..c7941b9 100644 --- a/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/addons/File_Commander.py +++ b/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/addons/File_Commander.py @@ -28,9 +28,7 @@ from Tools.Directories import fileExists from errno import ENOENT import sys -from gettext import gettext - -_ = gettext +from .. import _ PY3 = sys.version_info[0] >= 3 DEFAULT_MODULE_NAME = __name__.split(".")[-1] @@ -180,8 +178,7 @@ def __init__(self, session, file): self.skin = _build_skin() Screen.__init__(self, session) self.file_name = file - title = "Lululla File Commander" - self.newtitle = 'Console' if title == 'vEditorScreen' else title + self.newtitle = "Lululla File Commander" self.list = [] self["filedata"] = MenuList(self.list) self["actions"] = ActionMap(["WizardActions", "ColorActions", "DirectionActions"], { From e3f6e631009c8d26d6a27b34cd78506c2c907930 Mon Sep 17 00:00:00 2001 From: pQu4k3r Date: Tue, 21 Jul 2026 22:31:59 +0000 Subject: [PATCH 3/3] Release v3.0.2 Hotfix release: 3.0.1's Script Installer refactor broke every remote entry (wget/opkg command lines were handed to sh as a filename). Version bumped in __init__.py, CONTROL/control, installer.sh and the README badge (which was still at 3.0.0); installer.sh changelog updated for the in-plugin update prompt. --- CONTROL/control | 2 +- README.md | 2 +- installer.sh | 4 ++-- .../python/Plugins/Extensions/LinuxsatPanel/__init__.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index b0c57c8..f7fb325 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,5 +1,5 @@ Package: enigma2-plugin-extensions-linuxsat-panel -Version: 3.0.1 +Version: 3.0.2 Description: addons panel Section: extra Priority: optional diff --git a/README.md b/README.md index 7262b3e..5bca376 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

- Version + Version diff --git a/installer.sh b/installer.sh index a2c69b5..0f382b9 100644 --- a/installer.sh +++ b/installer.sh @@ -1,7 +1,7 @@ #!/bin/bash -version='3.0.1' -changelog="\n--Bump plugin version to 3.0.1\n--Rework File_Commander: replace static skin with _build_skin() that computes layout from desktop size (HD/FHD/4K scaling)\n--Add getDesktopSize(), clean up imports and fileReadLines error/encoding handling\n--Add translate_utils.py: new Google Translate wrapper with caching, Arabic detection, batch support and disk-persisted translation_cache.json (moved into locale/)\n--Minor locale fixes (.pot/.po and .mo) and translation_cache.json cleanup" +version='3.0.2' +changelog="\n--Hotfix: remote scripts in Script Installer failed to run in 3.0.1 (wget/opkg entries were passed to sh as a filename)\n--Local sh scripts now listed in stable alphabetical order\n--File Commander button labels translated again\n--translate_utils can now be imported (missing package constants added)" TMPPATH=/tmp/LinuxsatPanel-install FILEPATH=/tmp/LinuxsatPanel-main.tar.gz diff --git a/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/__init__.py b/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/__init__.py index b846a8e..9ea4603 100644 --- a/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/__init__.py +++ b/usr/lib/enigma2/python/Plugins/Extensions/LinuxsatPanel/__init__.py @@ -35,7 +35,7 @@ __email__ = "ekekaz@gmail.com" __copyright__ = 'Copyright (c) 2024 Lululla' __license__ = "GPL-v2" -__version__ = "3.0.1" +__version__ = "3.0.2" def check_and_install_requests():