Skip to content

Commit d1198f2

Browse files
committed
fix: resolve compatibility issues caused by Twitch API changes
1 parent 4274098 commit d1198f2

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

Services/Twitch/GQL/TwitchGQLAPI.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,12 @@ def getStreamPlaybackAccessToken(self, login: str) -> TwitchGQLResponse:
249249
}
250250
},
251251
"variables": {
252-
"isLive": True,
253252
"login": login,
254-
"isVod": False,
253+
"isLive": True,
255254
"vodID": "",
256-
"playerType": "embed"
255+
"isVod": False,
256+
"playerType": "embed",
257+
"platform": ""
257258
}
258259
},
259260
{
@@ -265,10 +266,10 @@ def getStreamPlaybackAccessToken(self, login: str) -> TwitchGQLResponse:
265266
}
266267
},
267268
"variables": {
268-
"isLive": True,
269269
"login": login,
270-
"isVOD": False,
270+
"isLive": True,
271271
"vodID": "",
272+
"isVOD": False,
272273
"isCollection": False,
273274
"collectionID": ""
274275
}
@@ -296,11 +297,12 @@ def getVideoPlaybackAccessToken(self, id: str) -> TwitchGQLResponse:
296297
}
297298
},
298299
"variables": {
299-
"isLive": False,
300300
"login": "",
301-
"isVod": True,
301+
"isLive": False,
302302
"vodID": id,
303-
"playerType": "embed"
303+
"isVod": True,
304+
"playerType": "embed",
305+
"platform": ""
304306
}
305307
},
306308
parser=self._videoPlaybackAccessTokenParser,

Services/Twitch/GQL/TwitchGQLConfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class Config:
33
CLIENT_ID = "kimne78kx3ncx6brgo4mv6wki5h1ko"
44
LOAD_LIMIT = 30
55

6-
STREAM_PLAYBACK_ACCESS_TOKEN_OPERATOR = ("PlaybackAccessToken", "0828119ded1c13477966434e15800ff57ddacf13ba1911c129dc2200705b0712")
6+
STREAM_PLAYBACK_ACCESS_TOKEN_OPERATOR = ("PlaybackAccessToken", "ed230aa1e33e07eebb8928504583da78a5173989fadfb1ac94be06a04f3cdbe9")
77
STREAM_AD_REQUEST_HANDLING_OPERATOR = ("AdRequestHandling", "61a5ecca6da3d924efa9dbde811e051b8a10cb6bd0fe22c372c2f4401f3e88d1")
8-
VIDEO_PLAYBACK_ACCESS_TOKEN_TOKEN_OPERATOR = ("PlaybackAccessToken", "0828119ded1c13477966434e15800ff57ddacf13ba1911c129dc2200705b0712")
8+
VIDEO_PLAYBACK_ACCESS_TOKEN_TOKEN_OPERATOR = ("PlaybackAccessToken", "ed230aa1e33e07eebb8928504583da78a5173989fadfb1ac94be06a04f3cdbe9")
99
CLIP_PLAYBACK_ACCESS_TOKEN_TOKEN_OPERATOR = ("VideoAccessToken_Clip", "36b89d2507fce29e5ca551df756d27c1cfe079e2609642b4390aa4c35796eb11")

0 commit comments

Comments
 (0)