Added extra auths with jellyfin to avoid expiry

Also fixed running multiple authentications on one Jellyfin object.
This commit is contained in:
2020-04-22 21:54:31 +01:00
parent 785cf76a17
commit 9b8204eb12
2 changed files with 17 additions and 1 deletions

View File

@@ -76,6 +76,11 @@ class Jellyfin:
json = response.json()
self.userId = json['User']['Id']
self.accessToken = json['AccessToken']
self.auth = "MediaBrowser "
self.auth += f"Client={self.client}, "
self.auth += f"Device={self.device}, "
self.auth += f"DeviceId={self.deviceId}, "
self.auth += f"Version={self.version}"
self.auth += f", Token={self.accessToken}"
self.header['X-Emby-Authorization'] = self.auth
return True