Log errors when gettting segments properly. Also forgot to remove a print

This commit is contained in:
dmunozv04
2023-11-05 17:38:10 +01:00
parent db647362c6
commit 138d8bd51c
2 changed files with 3 additions and 2 deletions

View File

@@ -115,7 +115,8 @@ class ApiHelper:
async with self.web_session.get(url, headers=headers, params=params) as response:
response_json = await response.json()
if(response.status != 200):
print(f"Error getting segments for video {vid_id}, hashed as {vid_id_hashed}. Code: {response.status} - {response.text()}")
response_text = await response.text()
print(f"Error getting segments for video {vid_id}, hashed as {vid_id_hashed}. Code: {response.status} - {response_text}")
return ([], True)
for i in response_json:
if str(i["videoID"]) == str(vid_id):

View File

@@ -46,7 +46,7 @@ class YtLoungeApi(pyytlounge.YtLoungeApi):
# Process a lounge subscription event
def _process_event(self, event_id: int, event_type: str, args):
print(f"YtLoungeApi.__process_event({event_id}, {event_type}, {args})")
#print(f"YtLoungeApi.__process_event({event_id}, {event_type}, {args})")
# (Re)start the watchdog
try:
self.subscribe_task_watchdog.cancel()