From b76040e947f8445594a21093c05c7e84b0c1a208 Mon Sep 17 00:00:00 2001 From: Chris Browet Date: Fri, 2 Jul 2021 09:57:47 +0200 Subject: [PATCH] Optimisation --- custom_components/jellyfin/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/jellyfin/__init__.py b/custom_components/jellyfin/__init__.py index 35433e2..e4c148b 100644 --- a/custom_components/jellyfin/__init__.py +++ b/custom_components/jellyfin/__init__.py @@ -713,8 +713,9 @@ class JellyfinClientManager(object): return for item in self._yamc["Items"]: - item["stream_url"] = (await self.get_stream_url(item["Id"], item["Type"]))[0] - item["info"] = (await self.get_stream_url(item["Id"], item["Type"]))[2] + stream_info = await self.get_stream_url(item["Id"], item["Type"]) + item["stream_url"] = stream_info[0] + item["info"] = stream_info[2] _LOGGER.debug("update yamc query: %s", str(query)) _LOGGER.debug(" response: %s", str(self._yamc))