From fcc277d1d3cd3b9deae5ae5f47a569955eaaa879 Mon Sep 17 00:00:00 2001 From: Tobias Leuschner Date: Sun, 10 May 2026 11:36:08 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20Logo-Update=20bei=20Installation=20hinz?= =?UTF-8?q?ugef=C3=BCgt;=20Versionsnummer=20auf=201.0.64=20erh=C3=B6ht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 8 ++++++++ version.txt | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 4ac722a..93c7d6b 100644 --- a/app.py +++ b/app.py @@ -2033,6 +2033,9 @@ def r_update_install(): # Syntax-Check bevor wir irgendetwas überschreiben compile(new_code, 'app.py', 'exec') + logo_req = _urlreq.urlopen(f'{RAW_BASE}/PiCopy_Logo.png', timeout=30) + logo_data = logo_req.read() + tmp = Path('/opt/picopy/app.py.tmp') tmp.write_text(new_code, encoding='utf-8') with open(tmp, 'rb') as fh: @@ -2043,6 +2046,11 @@ def r_update_install(): with open(vtmp, 'rb') as fh: os.fsync(fh.fileno()) os.replace(str(vtmp), '/opt/picopy/version.txt') + ltmp = Path('/opt/picopy/PiCopy_Logo.png.tmp') + ltmp.write_bytes(logo_data) + with open(ltmp, 'rb') as fh: + os.fsync(fh.fileno()) + os.replace(str(ltmp), '/opt/picopy/PiCopy_Logo.png') log.info('Update installiert - starte Dienst neu...') # Systemd startet den Dienst automatisch neu diff --git a/version.txt b/version.txt index 96462aa..ef3b2e2 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.63 \ No newline at end of file +1.0.64 \ No newline at end of file