Skip to content

Commit

Permalink
Merge pull request #67 from w0330t/fix/searchx-api-requests-timeout
Browse files Browse the repository at this point in the history
Fix/searchx api requests timeout
  • Loading branch information
HisAtri authored Sep 1, 2024
2 parents f72d89a + 22ce84b commit dbdc2dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/searchx/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
def search(title='', artist='', album='') -> list:
try:
url = f"http://cn.lrc.cx:880/jsonapi?title={title}&artist={artist}&album={album}&path=None&limit=1&api=lrcapi"
response = requests.get(url, headers=headers)
response = requests.get(url, headers=headers, timeout=15)
return response.json()
except Exception as e:
print(f"LrcAPI Server - Request failed: {e}")
Expand Down

0 comments on commit dbdc2dd

Please sign in to comment.