move _jwt_is_expired to utils

This commit is contained in:
Michaël De Boey
2025-03-16 23:40:50 +01:00
parent 98a68be9b8
commit 1b1117a9c5
12 changed files with 32 additions and 22 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ from ..utils import (
ExtractorError,
OnDemandPagedList,
int_or_none,
jwt_is_expired,
mimetype2ext,
qualities,
traverse_obj,
@@ -22,7 +23,7 @@ class IwaraBaseIE(InfoExtractor):
def _is_token_expired(self, token, token_type):
# User token TTL == ~3 weeks, Media token TTL == ~1 hour
if self._jwt_is_expired(token, 120):
if jwt_is_expired(token, 120):
self.to_screen(f'{token_type} token has expired')
return True