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 5f8311d..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(): @@ -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"], { 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,