From da6bba30a4512ff35f3968d0fe50110c161c43d3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 4 Jan 2025 13:41:21 -0700 Subject: [PATCH] Fix nfl linear access check --- README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- services/nfl-handler.ts | 12 ++++++++++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ce32fe4..4717274 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

-Current version: **4.1.4** +Current version: **4.1.5** # About This takes ESPN+, ESPN, FOX Sports, CBS Sports, Paramount+, Gotham Sports, NFL, B1G+, NESN, Mountain West, FloSports, or MLB.tv programming and transforms it into a "live TV" experience with virtual linear channels. It will discover what is on, and generate a schedule of channels that will give you M3U and XMLTV files that you can import into something like [Jellyfin](https://jellyfin.org) or [Channels](https://getchannels.com). diff --git a/package-lock.json b/package-lock.json index fd18b03..40656d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "eplustv", - "version": "4.1.4", + "version": "4.1.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "eplustv", - "version": "4.1.4", + "version": "4.1.5", "license": "MIT", "dependencies": { "@hono/node-server": "^1.13.1", diff --git a/package.json b/package.json index 58dbc58..e3970be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eplustv", - "version": "4.1.4", + "version": "4.1.5", "description": "", "scripts": { "start": "ts-node -r tsconfig-paths/register index.tsx", diff --git a/services/nfl-handler.ts b/services/nfl-handler.ts index 2cd5fb8..eae1cdd 100644 --- a/services/nfl-handler.ts +++ b/services/nfl-handler.ts @@ -508,7 +508,11 @@ class NflHandler { if (plans) { const redZoneAccess = - plans.findIndex(p => p.plan === 'NFL_PLUS_PREMIUM' && (p.status === 'ACTIVE' || (p.status === 'CANCELLED' && p.expirationDate >= (new Date()).toISOString().split('T')[0]))) > -1 || networks?.NFLRZ + plans.findIndex( + p => + p.plan === 'NFL_PLUS_PREMIUM' && + (p.status === 'ACTIVE' || (p.status === 'CANCELLED' && moment(p.expirationDate).isAfter(moment()))), + ) > -1 || networks?.NFLRZ ? true : false; @@ -558,7 +562,11 @@ class NflHandler { if (plans) { hasPlus = - plans.findIndex(p => (p.plan === 'NFL_PLUS' || p.plan === 'NFL_PLUS_PREMIUM') && (p.status === 'ACTIVE' || (p.status === 'CANCELLED' && p.expirationDate >= (new Date()).toISOString().split('T')[0]))) > -1 + plans.findIndex( + p => + (p.plan === 'NFL_PLUS' || p.plan === 'NFL_PLUS_PREMIUM') && + (p.status === 'ACTIVE' || (p.status === 'CANCELLED' && moment(p.expirationDate).isAfter(moment()))), + ) > -1 ? true : false; }