From 14b3667baa23ce06224ea22c3eadbe74334bad17 Mon Sep 17 00:00:00 2001 From: nutty Date: Sun, 16 Aug 2026 08:27:41 +1000 Subject: [PATCH] =?UTF-8?q?=E2=80=A2=20Decreased=20cache=20time=20?= =?UTF-8?q?=E2=80=A2=20Increased=20album=20art=20quality=20(40->80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- smtc-bridge.pyw | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/smtc-bridge.pyw b/smtc-bridge.pyw index a82751f..004e8fe 100644 --- a/smtc-bridge.pyw +++ b/smtc-bridge.pyw @@ -168,13 +168,13 @@ try: async def get_all_media_info(): try: - # We will cache the last execution time and payload to avoid redundant parsing if requests flood in faster than 1 second. + # We will cache the last execution time and payload to avoid redundant parsing if requests flood in faster than 0.5 seconds. current_time = time.time() global smtc_manager, last_execution_time, last_payload, album_art_cache - # If requests flood in faster than 1 second, return the cached result + # If requests flood in faster than 0.5 seconds, return the cached result # to completely spare the CPU from redundant parsing. - if (current_time - last_execution_time) < 1.0 and last_payload: + if (current_time - last_execution_time) < 0.5 and last_payload: # print("Using cached media info.") return last_payload # else: @@ -343,7 +343,7 @@ try: img.save( thumb_path, "JPEG", - quality=40, # Sweet spot for small size / high visual fidelity + quality=80, # Sweet spot for small size / high visual fidelity subsampling=2, # Faster compression algorithm for low-end CPUs optimize=False # Skips the extra CPU pass )