From fd6dbe7f77b1db6feb5491af0b2dcf735b1eb3a5 Mon Sep 17 00:00:00 2001 From: Olivier <16240457+TiTidom-RC@users.noreply.github.com> Date: Sun, 22 Feb 2026 09:03:40 +0100 Subject: [PATCH 1/3] Gracefully stop tvremoted daemon; bump version Improve daemon shutdown: send SIGTERM (system::kill(pid, false)) only if pid>0, wait up to ~3s for the pid file to disappear, then remove the pid file. Keep a final system::kill('tvremoted.py') as a SIGKILL safety for zombies and remove the redundant sleep(1). Also bump plugin version to 1.3.14. --- core/class/tvremote.class.php | 11 ++++++++--- plugin_info/info.json | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/class/tvremote.class.php b/core/class/tvremote.class.php index 730bc89..8f37ead 100644 --- a/core/class/tvremote.class.php +++ b/core/class/tvremote.class.php @@ -169,11 +169,16 @@ public static function deamon_stop() { $pid_file = jeedom::getTmpFolder(__CLASS__) . '/deamon.pid'; // Ne PAS modifier if (file_exists($pid_file)) { $pid = intval(trim(file_get_contents($pid_file))); - system::kill($pid); + if ($pid > 0) { + system::kill($pid, false); // SIGTERM seul, sans SIGKILL immédiat + for ($i = 0; $i < 30 && file_exists($pid_file); $i++) { + usleep(100000); // Attend max 3s que le processus meure + } + } + @unlink($pid_file); } - system::kill('tvremoted.py'); + system::kill('tvremoted.py'); // SIGKILL de sécurité si zombie system::fuserk(config::byKey('socketport', __CLASS__, '55112')); - sleep(1); } public static function sendToDaemon($params) { diff --git a/plugin_info/info.json b/plugin_info/info.json index 0f6a164..144858c 100644 --- a/plugin_info/info.json +++ b/plugin_info/info.json @@ -1,7 +1,7 @@ { "id": "tvremote", "name": "TV Remote", - "pluginVersion": "1.3.13", + "pluginVersion": "1.3.14", "description": { "fr_FR": "Plugin pour contrôler les équipements Android de type Télévision (Sony, Nvidia Shield, Freebox TV, etc...) via le service de télécommande Google (TVRemote) ou via ADB. Il permet de contrôler les différentes fonctions de sa télévision (power, volume, entrées HDMI, lancement d'applications, chaînes TV, navigation dans l'interface, etc...)", "en_US": "Plugin to control Android TV devices (Sony, Nvidia Shield, Freebox TV, etc...) via Google remote control service (TVRemote) or via ADB. It allows you to control various functions of your TV (power, volume, HDMI inputs, launching applications, TV channels, navigating the interface, etc...)", From 537c8deec55191ca2e2f1c2502ac86594bb53d91 Mon Sep 17 00:00:00 2001 From: Olivier <16240457+TiTidom-RC@users.noreply.github.com> Date: Sun, 22 Feb 2026 09:29:38 +0100 Subject: [PATCH 2/3] Refactor CI workflows: PHP lint & translations Rename and tidy CI workflows and refine triggers. checkPHP -> "PHP Syntax Check": rename job from build to php-lint, remove the push trigger so it runs on pull_request (beta) and clean up the lint step. Translations -> "Build Translations": add paths-ignore for core/i18n and plugin_info/info.json, add a workflow_dispatch input (languages) with a sensible default, parameterize target_languages to use the input with fallback, and disable include_empty_translation. These changes make workflow names clearer, allow manual runs with custom language lists, and avoid unnecessary translation runs for core/meta file changes. --- .github/workflows/checkPHP.yml | 10 +++------- .github/workflows/translations.yml | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/checkPHP.yml b/.github/workflows/checkPHP.yml index 24a76b5..0d68f3e 100644 --- a/.github/workflows/checkPHP.yml +++ b/.github/workflows/checkPHP.yml @@ -1,19 +1,15 @@ -name: checkPHP +name: PHP Syntax Check on: - push: - branches: - - beta pull_request: branches: - beta jobs: - build: + php-lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + - name: PHP Syntax Checker (Lint) uses: StephaneBour/actions-php-lint@8.4 - with: - dir: '.' diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index 044bdd6..170b4ff 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -1,11 +1,18 @@ -name: Translations +name: Build Translations -# Controls when the workflow will run on: - workflow_dispatch: push: branches: - beta + paths-ignore: + - 'core/i18n/**' + - 'plugin_info/info.json' + workflow_dispatch: + inputs: + languages: + description: 'Langues cibles (séparées par des virgules)' + required: true + default: 'en_US,es_ES,de_DE,it_IT,pt_PT' jobs: auto-translate: @@ -13,6 +20,7 @@ jobs: steps: - uses: Mips2648/plugins-translations@main with: - target_languages: "en_US,es_ES,de_DE,it_IT,pt_PT" + target_languages: ${{ inputs.languages || 'en_US,es_ES,de_DE,it_IT,pt_PT' }} use_core_translations: false + include_empty_translation: false deepl_api_key: ${{ secrets.DEEPL_API_KEY }} From b73be74a0c9dbd0cdb2860ebd8c912b7c95f54ff Mon Sep 17 00:00:00 2001 From: Olivier <16240457+TiTidom-RC@users.noreply.github.com> Date: Wed, 25 Feb 2026 21:56:01 +0100 Subject: [PATCH 3/3] Update translations.yml --- .github/workflows/translations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index 170b4ff..6a9bb01 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -18,7 +18,7 @@ jobs: auto-translate: runs-on: ubuntu-latest steps: - - uses: Mips2648/plugins-translations@main + - uses: TiTidom-RC/plugins-translations@beta with: target_languages: ${{ inputs.languages || 'en_US,es_ES,de_DE,it_IT,pt_PT' }} use_core_translations: false