We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ff1520 commit e071e8dCopy full SHA for e071e8d
resources/lib/traktapi.py
@@ -1,6 +1,7 @@
1
# -*- coding: utf-8 -*-
2
#
3
import logging
4
+import os
5
import time
6
from json import dumps, loads
7
@@ -44,9 +45,16 @@ def __init__(self, force=False):
44
45
Trakt.http.proxies = {"http": proxyURL, "https": proxyURL}
46
47
# Configure
48
+ client_id = os.environ.get("TRAKT_CLIENT_ID")
49
+ client_secret = os.environ.get("TRAKT_CLIENT_SECRET")
50
+
51
+ if not client_id or not client_secret:
52
+ client_id = deobfuscate(self.__client_id)
53
+ client_secret = deobfuscate(self.__client_secret)
54
55
Trakt.configuration.defaults.client(
- id=deobfuscate(self.__client_id),
- secret=deobfuscate(self.__client_secret),
56
+ id=client_id,
57
+ secret=client_secret,
58
)
59
60
# Bind event
0 commit comments