feat: Adds jellyfin external URL and timeout gh-13
- Adds Jellyfin external URL config option - URL to send to users if different from server URL. - Adds Jellyfin server setup timeout after 5 seconds, and response delaying so discord bot doesn't timeout task: gh-13
This commit is contained in:
@@ -164,12 +164,12 @@ def get_config(jellyfin_url, jellyfin_api_key):
|
||||
url = f"{jellyfin_url}/System/Configuration"
|
||||
|
||||
querystring = {"api_key":jellyfin_api_key}
|
||||
response = requests.request("GET", url, params=querystring)
|
||||
response = requests.request("GET", url, params=querystring, timeout=5)
|
||||
return response.json()
|
||||
|
||||
def get_status(jellyfin_url, jellyfin_api_key):
|
||||
url = f"{jellyfin_url}/System/Configuration"
|
||||
|
||||
querystring = {"api_key":jellyfin_api_key}
|
||||
response = requests.request("GET", url, params=querystring)
|
||||
response = requests.request("GET", url, params=querystring, timeout=5)
|
||||
return response.status_code
|
||||
Reference in New Issue
Block a user