Feat: add support for monochrome provider icons (#1911)
authorMaxim Raznatovski <nda.mr43@gmail.com>
Thu, 30 Jan 2025 11:46:21 +0000 (12:46 +0100)
committerGitHub <noreply@github.com>
Thu, 30 Jan 2025 11:46:21 +0000 (12:46 +0100)
music_assistant/mass.py

index 9b081c0ea122014271ca594de59f47e4b27d97a1..3669771448f86d7ed42261890ce7156379a7dd70 100644 (file)
@@ -695,6 +695,11 @@ class MusicAssistant:
                         icon_path = os.path.join(provider_path, "icon_dark.svg")
                         if await isfile(icon_path):
                             provider_manifest.icon_svg_dark = await get_icon_string(icon_path)
+                    # check for icon_monochrome file
+                    if not provider_manifest.icon_svg_monochrome:
+                        icon_path = os.path.join(provider_path, "icon_monochrome.svg")
+                        if await isfile(icon_path):
+                            provider_manifest.icon_svg_monochrome = await get_icon_string(icon_path)
                     self._provider_manifests[provider_manifest.domain] = provider_manifest
                     LOGGER.debug("Loaded manifest for provider %s", provider_manifest.name)
                 except Exception as exc: