File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 88import sys
99import time
1010from datetime import datetime , timedelta , timezone
11- from functools import wraps
11+ from functools import lru_cache , wraps
1212from json import JSONDecodeError
1313from typing import NamedTuple
1414from urllib .parse import urljoin
@@ -366,6 +366,20 @@ def init(*args, **kwargs):
366366 return auth_method .get (AUTH_METHOD , PIN_AUTH )(* args , ** kwargs )
367367
368368
369+ @lru_cache (maxsize = None )
370+ def config ():
371+ from trakt .config import AuthConfig
372+
373+ return AuthConfig (CONFIG_PATH ).update (
374+ APPLICATION_ID = APPLICATION_ID ,
375+ CLIENT_ID = CLIENT_ID ,
376+ CLIENT_SECRET = CLIENT_SECRET ,
377+ OAUTH_EXPIRES_AT = OAUTH_EXPIRES_AT ,
378+ OAUTH_REFRESH = OAUTH_REFRESH ,
379+ OAUTH_TOKEN = OAUTH_TOKEN ,
380+ )
381+
382+
369383class Airs (NamedTuple ):
370384 day : str
371385 time : str
You can’t perform that action at this time.
0 commit comments