fix: icon encoding

This commit is contained in:
Inex Code 2024-12-21 17:30:21 +03:00
parent f9f3868b5d
commit 5218187d6d
No known key found for this signature in database

View file

@ -1,5 +1,6 @@
"""A Service implementation that loads all needed data from a JSON file"""
import base64
from enum import Enum
import json
import subprocess
@ -373,7 +374,7 @@ class TemplatedService(Service):
return self.meta.description
def get_svg_icon(self) -> str:
return self.meta.svg_icon
return base64.b64encode(self.meta.svg_icon.encode("utf-8")).decode("utf-8")
def get_subdomain(self) -> Optional[str]:
# If there are no subdomain options, return None