Commit 4416a53e authored by echel0n's avatar echel0n

Resolved issues with setting jwt_payload value for TheTVDB API.

parent 4c837817
......@@ -350,10 +350,16 @@ class Tvdb:
def jwt_token(self, value):
if self.jwt_token != value:
setattr(self, '_jwt_token', value)
self.jwt_payload = self.get_jwt_payload(self.jwt_token)
@property
def jwt_payload(self):
return getattr(self, '_jwt_payload', self.get_jwt_payload(self.token))
return getattr(self, '_jwt_payload', {})
@jwt_payload.setter
def jwt_payload(self, value):
if self.jwt_payload != value:
setattr(self, '_jwt_payload', value)
@property
def jwt_expiration(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment