diff --git a/jellyfin_kodi/jellyfin/api.py b/jellyfin_kodi/jellyfin/api.py index 6a3687ac..69987883 100644 --- a/jellyfin_kodi/jellyfin/api.py +++ b/jellyfin_kodi/jellyfin/api.py @@ -264,27 +264,25 @@ class API(object): False = Not installed, scheduled for uninstalling or disabled """ try: - res = self.get_plugins() # type: requests.Response - if res.ok: - kodi_sync_queue = [ - x - for x in res.json() - if x.get("Id") == "771e19d653854cafb35c28a0e865cf63" - ] + kodi_sync_queue = [ + x + for x in self.get_plugins() + if x.get("Id") == "771e19d653854cafb35c28a0e865cf63" + ] - LOG.debug("KodiSyncQueue Plugins result: %s", kodi_sync_queue) + LOG.debug("KodiSyncQueue Plugins result: %s", kodi_sync_queue) - kodi_sync_queue_filtered = [ - x - for x in kodi_sync_queue - if x.get("Status") - in ["Active", "Restart", "Malfunctioned", "NotSupported"] - ] + kodi_sync_queue_filtered = [ + x + for x in kodi_sync_queue + if x.get("Status") + in ["Active", "Restart", "Malfunctioned", "NotSupported"] + ] - if kodi_sync_queue_filtered: - return True - else: - return False + if kodi_sync_queue_filtered: + return True + else: + return False except requests.RequestException as e: LOG.warning("Error checking companion installed state: %s", e)