Skip to content

Commit

Permalink
Update api.py
Browse files Browse the repository at this point in the history
Update to read MSEdge Cached Login
  • Loading branch information
JCalvi authored Oct 20, 2023
1 parent d1deadd commit 002075d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions plugin.video.kayo.sports/resources/lib/api.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import uuid
from slyguy import settings, userdata
from slyguy.exceptions import Error
from slyguy.util import jwt_data
Expand All @@ -7,12 +8,14 @@
from .constants import *
from .language import _


class APIError(Error):
pass

class API(BaseAPI):

BASE_URL = API_URL
CLIENT_ID = CLIENT_ID
CLIENT_ID = userdata.get('client_id')

def is_subscribed(self):
if self._subscribed is not None:
Expand Down Expand Up @@ -114,14 +117,14 @@ def stream(self, asset_id):

payload = {
'assetId': asset_id,
'canPlayHevc': settings.common_settings.getBool('h265', False),
'canPlayHevc': settings.common_settings.getBool('h265', True),
# 'contentType': 'application/xml+dash',
# 'drm': True,
'forceSdQuality': False,
'playerName': 'exoPlayerTV',
'udid': UDID,
}
'udid': str(uuid.uuid4()),

}
data = self._session.post(PLAY_URL + '/play', json=payload, headers=self._auth_header)
if ('status' in data and data['status'] != 200) or 'errors' in data:
msg = data.get('detail') or data.get('errors', [{}])[0].get('detail')
Expand Down

0 comments on commit 002075d

Please sign in to comment.