From 138d8bd51cf2ed4e0285cafa90816590e74d87d4 Mon Sep 17 00:00:00 2001 From: dmunozv04 <39565245+dmunozv04@users.noreply.github.com> Date: Sun, 5 Nov 2023 17:38:10 +0100 Subject: [PATCH] Log errors when gettting segments properly. Also forgot to remove a print --- iSponsorBlockTV/api_helpers.py | 3 ++- iSponsorBlockTV/ytlounge.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/iSponsorBlockTV/api_helpers.py b/iSponsorBlockTV/api_helpers.py index 52a80b0..0d83a5d 100644 --- a/iSponsorBlockTV/api_helpers.py +++ b/iSponsorBlockTV/api_helpers.py @@ -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): diff --git a/iSponsorBlockTV/ytlounge.py b/iSponsorBlockTV/ytlounge.py index 5ba9596..e465f43 100644 --- a/iSponsorBlockTV/ytlounge.py +++ b/iSponsorBlockTV/ytlounge.py @@ -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()