From 843c16bbd7fe1383c99907d6b40edc13dd515fe2 Mon Sep 17 00:00:00 2001 From: Silversthorn Date: Fri, 4 Mar 2022 21:09:13 +0100 Subject: [PATCH] Fixing icon bug --- app/classes/minecraft/stats.py | 1 + app/classes/shared/server.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/classes/minecraft/stats.py b/app/classes/minecraft/stats.py index ae4f5908..93f56053 100644 --- a/app/classes/minecraft/stats.py +++ b/app/classes/minecraft/stats.py @@ -161,6 +161,7 @@ class Stats: try: server_icon = base64.encodebytes(ping_obj.icon) + server_icon = server_icon.decode('utf-8') except Exception as e: server_icon = False logger.info(f"Unable to read the server icon : {e}") diff --git a/app/classes/shared/server.py b/app/classes/shared/server.py index 5697babe..6a7d4e16 100644 --- a/app/classes/shared/server.py +++ b/app/classes/shared/server.py @@ -487,6 +487,8 @@ class Server: # clear the old scheduled watcher task self.server_scheduler.remove_job(f"c_{self.server_id}") + # remove the stats polling job since server is stopped + self.server_scheduler.remove_job("stats_"+str(self.server_id)) # the server crashed, or isn't found - so let's reset things. logger.warning(f"The server {name} seems to have vanished unexpectedly, did it crash?")