From a9f9a5b31c05fa3347b67c84027e1071c82332bd Mon Sep 17 00:00:00 2001 From: bertybuttface <110790513+bertybuttface@users.noreply.github.com> Date: Sat, 27 Jan 2024 16:36:31 +0000 Subject: [PATCH] Update api_helpers.py Fix list to tuple --- src/iSponsorBlockTV/api_helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iSponsorBlockTV/api_helpers.py b/src/iSponsorBlockTV/api_helpers.py index c7f98e5..e7df318 100644 --- a/src/iSponsorBlockTV/api_helpers.py +++ b/src/iSponsorBlockTV/api_helpers.py @@ -10,9 +10,9 @@ from .conditional_ttl_cache import AsyncConditionalTTL def list_to_tuple(function): def wrapper(*args): - args = [tuple(x) if x is list else x for x in args] + args = [tuple(x) if isinstance(x, list) else x for x in args] result = function(*args) - result = tuple(result) if result is list else result + result = tuple(result) if isinstance(result, list) else result return result return wrapper