|
18 | 18 | class VtmGoStream: |
19 | 19 | """ VTM GO Stream API """ |
20 | 20 |
|
21 | | - _V5_API_KEY = '3vjmWnsxF7SUTeNCBZlnUQ4Z7GQV8f6miQ514l10' |
22 | 21 | _V6_API_KEY = 'r9EOnHOp1pPL5L4FuGzBPSIHwrQnPu5TBfW16y75' |
23 | 22 |
|
24 | 23 | def __init__(self, tokens=None): |
@@ -160,34 +159,21 @@ def _get_video_info(self, strtype, stream_id, player_token): |
160 | 159 | """ |
161 | 160 | url = 'https://videoplayer-service.dpgmedia.net/config/%s/%s' % (strtype, stream_id) |
162 | 161 | _LOGGER.debug('Getting video info from %s', url) |
163 | | - # Live channels: Fallback to old Popcorn SDK 5 for Kodi 19 and lower, because new livestream format is not supported |
164 | | - if kodiutils.kodi_version_major() <= 19 and strtype == 'channels': |
165 | | - response = util.http_get(url, |
166 | | - params={ |
167 | | - 'startPosition': '0.0', |
168 | | - 'autoPlay': 'true', |
169 | | - }, |
170 | | - headers={ |
171 | | - 'Accept': 'application/json', |
172 | | - 'x-api-key': self._V5_API_KEY, |
173 | | - 'Popcorn-SDK-Version': '5', |
174 | | - }) |
175 | | - else: |
176 | | - response = util.http_post(url, |
177 | | - params={ |
178 | | - 'startPosition': '0.0', |
179 | | - 'autoPlay': 'true', |
180 | | - }, |
181 | | - data={ |
182 | | - 'deviceType': 'android-tv', |
183 | | - 'zone': 'vtmgo', |
184 | | - }, |
185 | | - headers={ |
186 | | - 'Accept': 'application/json', |
187 | | - 'x-api-key': self._V6_API_KEY, |
188 | | - 'Popcorn-SDK-Version': '6', |
189 | | - 'Authorization': 'Bearer ' + player_token, |
190 | | - }) |
| 162 | + response = util.http_post(url, |
| 163 | + params={ |
| 164 | + 'startPosition': '0.0', |
| 165 | + 'autoPlay': 'true', |
| 166 | + }, |
| 167 | + data={ |
| 168 | + 'deviceType': 'android-tv', |
| 169 | + 'zone': 'vtmgo', |
| 170 | + }, |
| 171 | + headers={ |
| 172 | + 'Accept': 'application/json', |
| 173 | + 'x-api-key': self._V6_API_KEY, |
| 174 | + 'Popcorn-SDK-Version': '6', |
| 175 | + 'Authorization': 'Bearer ' + player_token, |
| 176 | + }) |
191 | 177 |
|
192 | 178 | info = json.loads(response.text) |
193 | 179 | return info |
|
0 commit comments