Fixing icon bug

This commit is contained in:
Silversthorn 2022-03-04 21:09:13 +01:00
parent a76833b409
commit 843c16bbd7
2 changed files with 3 additions and 0 deletions

View File

@ -161,6 +161,7 @@ class Stats:
try: try:
server_icon = base64.encodebytes(ping_obj.icon) server_icon = base64.encodebytes(ping_obj.icon)
server_icon = server_icon.decode('utf-8')
except Exception as e: except Exception as e:
server_icon = False server_icon = False
logger.info(f"Unable to read the server icon : {e}") logger.info(f"Unable to read the server icon : {e}")

View File

@ -487,6 +487,8 @@ class Server:
# clear the old scheduled watcher task # clear the old scheduled watcher task
self.server_scheduler.remove_job(f"c_{self.server_id}") 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. # 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?") logger.warning(f"The server {name} seems to have vanished unexpectedly, did it crash?")