From 02af7c3e90b99e7c4e227ac3b41d5170fcc218c3 Mon Sep 17 00:00:00 2001 From: Janokisu <54418395+Janokisu@users.noreply.github.com> Date: Thu, 3 Nov 2022 23:08:53 +0100 Subject: [PATCH] Fix: fehlerhafte Fehlermeldung beim PC-Start Fix: Fehlermeldung zur fehlerhaften Python-Konfiguration beim PC-Start --- background.js | 2 +- manifest.json | 2 +- tools.js | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/background.js b/background.js index a458513..027107f 100644 --- a/background.js +++ b/background.js @@ -381,7 +381,7 @@ function CallMonitor_connnect(){ GL_PythonListen.stop(); - GL_PythonListen.start(); + GL_PythonListen.start("autostart"); let FBox = GL_Fritz_URL.split("//")[1]; diff --git a/manifest.json b/manifest.json index c4f3def..0fff07f 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "description": "__MSG_extensionDescription__", "manifest_version": 2, "name": "__MSG_extensionName__", - "version": "0.2.0", + "version": "0.2.1", "default_locale": "en", "icons": { "48": "icons/telefonliste.svg" diff --git a/tools.js b/tools.js index cd3e1d2..5294724 100644 --- a/tools.js +++ b/tools.js @@ -271,19 +271,29 @@ class PythonListen{ return ok; } - start(){ + start(x){ if(this.connect() == true){ if(this.send("version") == true){ const self = this; //Bezug herstellen + + let sek = 1; + if(x == "autostart"){ + sek = 10; + } + this.#thisTimeout = setTimeout(() => { + //es dauert aufällig lange. evtl noch ne alte Version self.errorEvent({ "state": 0, "code": 0, "message": "\n" + browser.i18n.getMessage("CallMon_alt", [CallMon_Version, self.getCallMonVer()]) }); - }, 2*1000); + + self.stop(); + + }, sek*1000); return true; }