mirror of
https://github.com/jellyfin/jellycon.git
synced 2024-11-27 16:20:44 +00:00
Ensure server is present in API requests
This commit is contained in:
parent
11705d46f2
commit
7c39b06297
@ -27,6 +27,11 @@ class API:
|
||||
if 'x-mediabrowser-token' not in self.headers:
|
||||
self.create_headers()
|
||||
|
||||
# Fixes initial login where class is initialized before wizard completes
|
||||
if not self.server:
|
||||
self.settings = xbmcaddon.Addon()
|
||||
self.server = self.settings.getSetting('server_address')
|
||||
|
||||
url = '{}{}'.format(self.server, path)
|
||||
|
||||
r = requests.get(url, headers=self.headers, verify=self.verify_cert)
|
||||
|
Loading…
Reference in New Issue
Block a user