From 959518499bdc71bdf63a2e6997281e5a7aaea234 Mon Sep 17 00:00:00 2001 From: AnimeDL Date: Sat, 9 Aug 2025 10:37:33 -0700 Subject: [PATCH] [HD]: Fix Token Refresh --- hidive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hidive.ts b/hidive.ts index 7c95f22..ccde87f 100644 --- a/hidive.ts +++ b/hidive.ts @@ -151,7 +151,7 @@ export default class Hidive implements ServiceClass { }; let apiReq = await this.req.getData(options.url, apiReqOpts); if(!apiReq.ok || !apiReq.res){ - if (apiReq.error && apiReq.error.res?.status == 401) { + if ((apiReq.error && apiReq.error.res?.status == 401) || (apiReq.res && apiReq.res.status == 401)) { console.warn('Token expired, refreshing token and retrying.'); if (await this.refreshToken()) { if (authType == 'other') {