Skip to content

Commit

Permalink
Fix nfl linear access check
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jan 4, 2025
1 parent 5ce19d3 commit da6bba3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="https://i.imgur.com/FIGZdR3.png">
</p>

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).
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
12 changes: 10 additions & 2 deletions services/nfl-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit da6bba3

Please sign in to comment.