Skip to content

Commit

Permalink
server, search: fix exception in audius search
Browse files Browse the repository at this point in the history
  • Loading branch information
dxstiny committed Jan 26, 2025
1 parent 9117d94 commit ec09c8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/server/handler/audius.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ async def search(self, query: str) -> List[AudiusTrack]:
async with aiohttp.ClientSession() as session:
async with session.get(endpoint) as response:
self._logger.debug("search response: %s", response.status)
data = await response.json()
if not data["data"]:
self._logger.debug("no data found")
data = dict(await response.json())
if not data.get("data"):
self._logger.debug("no data found (%s)", data)
return []
return [
AudiusTrack(track)
Expand Down

0 comments on commit ec09c8d

Please sign in to comment.