Skip to content

Commit

Permalink
fix: don't try re-parse dict
Browse files Browse the repository at this point in the history
  • Loading branch information
wolffshots committed Apr 24, 2024
1 parent 0104c4e commit 1cf592b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/audiobookshelf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Init for audiobookshelf integration"""

import asyncio
import json
import logging

from homeassistant.config_entries import ConfigEntry
Expand Down Expand Up @@ -92,7 +91,7 @@ async def _async_update_data(self) -> dict[str, None]:
method="get",
url=self.api.get_host() + "/api/libraries",
)
update["libraries"] = json.loads(library_stats_update)
update["libraries"] = library_stats_update
except ConnectionError:
update["libraries"] = "ConnectionError: Unable to connect."
except (TimeoutError, Timeout):
Expand Down

0 comments on commit 1cf592b

Please sign in to comment.