Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added core/__pycache__/__init__.cpython-313.pyc
Binary file not shown.
Binary file added core/__pycache__/control.cpython-313.pyc
Binary file not shown.
Binary file added core/__pycache__/parse.cpython-313.pyc
Binary file not shown.
Binary file added core/__pycache__/process.cpython-313.pyc
Binary file not shown.
Binary file added core/__pycache__/tagger.cpython-313.pyc
Binary file not shown.
Binary file added core/api/__pycache__/__init__.cpython-313.pyc
Binary file not shown.
Binary file added core/api/__pycache__/aptv.cpython-313.pyc
Binary file not shown.
Binary file added core/api/__pycache__/hls.cpython-313.pyc
Binary file not shown.
13 changes: 10 additions & 3 deletions core/api/aptv.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def __get_access_token(self):
)

accessToken = json.loads(m.text)
accessToken = accessToken[0]["data"]["configureParams"]["developerToken"]
if isinstance(accessToken, list):
accessToken = accessToken[0]["data"]["configureParams"]["developerToken"]
else:
accessToken = accessToken["data"][0]["data"]["configureParams"]["developerToken"]
self.session.headers.update(
{'authorization': f'Bearer {accessToken}'}
)
Expand Down Expand Up @@ -106,10 +109,10 @@ def __get_json(self):
}

try:
r = requests.get(url=apiUrl, params=params)
r = self.session.get(url=apiUrl, params=params)
except:
logger.warning("SSL failed! Trying without SSL...")
r = requests.get(url=apiUrl, params=params, verify=False)
r = self.session.get(url=apiUrl, params=params, verify=False)

return json.loads(r.text)

Expand All @@ -123,6 +126,10 @@ def fixdate(date):

data = self.__get_json()

if "backgroundVideo" not in data["data"]["content"]:
logger.error("No default trailer available for this content!", 1)
return None

try:
coverImage = data["data"]["content"]["backgroundVideo"]["images"]["contentImage"]["url"].format(
w=data["data"]["content"]["backgroundVideo"]["images"]["contentImage"]["width"],
Expand Down
Binary file added core/user/__pycache__/__init__.cpython-313.pyc
Binary file not shown.
Binary file added core/user/__pycache__/select.cpython-313.pyc
Binary file not shown.
Binary file added core/user/__pycache__/tracks.cpython-313.pyc
Binary file not shown.
Binary file added utils/__pycache__/__init__.cpython-313.pyc
Binary file not shown.
Binary file added utils/__pycache__/logger.cpython-313.pyc
Binary file not shown.
Binary file added utils/__pycache__/sanitize.cpython-313.pyc
Binary file not shown.