Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit b1dca65c6a85f10294fce1852a3d2453ad6e1a96
Author: bertybuttface <[email protected]>
Date:   Sat Jan 27 17:29:25 2024 +0000

    Update api_helpers.py

    catch and print specific errors
  • Loading branch information
bertybuttface committed Jan 27, 2024
1 parent 2610033 commit 1652384
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/iSponsorBlockTV/api_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ def process_segments(response):
segment_before_start = segments[-1]["start"]
segment_before_UUID = segments[-1]["UUID"]

except IndexError:
except IndexError as e:
print(f"IndexError: {e}")
segment_before_end = -10
if (
segment_dict["start"] - segment_before_end < 1
Expand All @@ -176,8 +177,8 @@ def process_segments(response):
segment_dict["UUID"].extend(segment_before_UUID)
segments.pop()
segments.append(segment_dict)
except Exception:
pass
except KeyError as e:
print(f"KeyError: {e}")
return segments, ignore_ttl

async def mark_viewed_segments(self, uuids):
Expand Down

0 comments on commit 1652384

Please sign in to comment.