Skip to content

Commit 35835b5

Browse files
committed
Add TRAKT_API configuration and update API key usage in Trakt integration
1 parent 74483ac commit 35835b5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/config/settings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,11 @@
265265
default="cdab0706269e4bca03a096fbc39920dadf7e4992",
266266
)
267267

268+
269+
TRAKT_API = config(
270+
"TRAKT_API",
271+
default="b4d9702b11cfaddf5e863001f68ce9d4394b678926e8a3f64d47bf69a55dd0fe",
272+
)
268273
SIMKL_ID = config(
269274
"SIMKL_ID",
270275
default="f1df351ddbace7e2c52f0010efdeb1fd59d379d9cdfb88e9a847c68af410db0e",

src/integrations/imports/trakt.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,10 @@ def importer(username, user, mode):
127127

128128
def get_response(url):
129129
"""Get the response from the Trakt API."""
130-
trakt_api = "b4d9702b11cfaddf5e863001f68ce9d4394b678926e8a3f64d47bf69a55dd0fe"
131130
headers = {
132131
"Content-Type": "application/json",
133132
"trakt-api-version": "2",
134-
"trakt-api-key": trakt_api,
133+
"trakt-api-key": settings.TRAKT_API,
135134
}
136135
return app.providers.services.api_request(
137136
"TRAKT",

0 commit comments

Comments
 (0)