Add device_auth method to trakt_api
This ensures trakt related methods/hacks are in trakt_api class
@@ -55,6 +55,11 @@ def __init__(self, batch_size=None):
trakt.core.CONFIG_PATH = pytrakt_file
load_config()
+ def device_auth(self, client_id: str, client_secret: str):
+ trakt.core.AUTH_METHOD = trakt.core.DEVICE_AUTH
+
+ return trakt.init(client_id=client_id, client_secret=client_secret, store=True)
+
@property
@memoize
@nocache
