Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/addons/list_addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ async def _get_addon_list(base_url: str, details: bool) -> list[AddonListItem]:
}
if details:
vinf["client_pyproject"] = await addon.get_client_pyproject()
vinf["client_metadata"] = await addon.get_client_metadata()

source_info = await addon.get_client_source_info(base_url=base_url)
if source_info is None:
Expand Down
13 changes: 13 additions & 0 deletions ayon_server/addons/addon.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import inspect
import os
import json

from ayon_server.entities.user import UserEntity

Expand Down Expand Up @@ -298,6 +299,18 @@ async def get_client_pyproject(self) -> dict[str, Any] | None:
except Exception:
raise AyonException("Unable to parse pyproject.toml") from None

async def get_client_metadata(self) -> dict[str, Any] | None:
if (pdir := self.get_private_dir()) is None:
return None
client_json = os.path.join(pdir, "client.json")
if not os.path.exists(client_json):
return None

try:
return json.load(open(client_json))
except Exception:
raise AyonException("Unable to parse client.json") from None

#
# Settings
#
Expand Down
Loading