Skip to content

Commit

Permalink
Added PPV ESPN events
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ngr31 committed Nov 13, 2023
1 parent 27b3474 commit f0ba2e9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
3 changes: 2 additions & 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: **2.0.19**
Current version: **2.0.20**

# About
This takes ESPN/ESPN+, FOX Sports, and 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), [Channels](https://getchannels.com), or [xTeVe](https://github.com/xteve-project/xTeVe).
Expand Down Expand Up @@ -51,6 +51,7 @@ Use if you would like to login with a TV provider or ESPN+ and access various ES
| ACCN | ACCN: Set if your TV provider supports it | False |
| ACCNX | ACCNX: Set if your TV provider supports it | False |
| LONGHORN | Longhorn Network: Set if your TV provider supports it | False |
| ESPN_PPV | PPV: Set if you have purchased PPV events | False |

#### FOX Sports
Use if you would like to login with a TV provider and access various FOX Sports events
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": "2.0.19",
"version": "2.0.20",
"description": "",
"scripts": {
"start": "ts-node index.ts",
Expand Down
12 changes: 12 additions & 0 deletions services/espn-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
useLonghorn,
useSec,
useSecPlus,
useEspnPpv,
} from './networks';
import {IAdobeAuth, isAdobeTokenValid, willAdobeTokenExpire, createAdobeAuthHeader} from './adobe-helpers';
import {getRandomHex} from './shared-helpers';
Expand Down Expand Up @@ -243,6 +244,9 @@ const getNetworkInfo = (network?: string) => {
} else if (network === 'longhorn') {
networks = '["5c1fd0f3-1022-3bc4-8af9-f785847baaf9"]';
packages = 'null';
} else if (network === 'espn_ppv') {
networks = '["d41c5aaf-e100-4726-841f-1e453af347f9"]';
packages = 'null';
}

return [networks, packages];
Expand Down Expand Up @@ -394,6 +398,10 @@ class EspnHandler {
const liveEntries = await this.getLiveEvents('longhorn');
entries = [...entries, ...liveEntries];
}
if (useEspnPpv) {
const liveEntries = await this.getLiveEvents('espn_ppv');
entries = [...entries, ...liveEntries];
}
} catch (e) {
console.log('Could not parse ESPN events');
}
Expand Down Expand Up @@ -444,6 +452,10 @@ class EspnHandler {
const upcomingEntries = await this.getUpcomingEvents(date.format('YYYY-MM-DD'), 'longhorn');
entries = [...entries, ...upcomingEntries];
}
if (useEspnPpv) {
const upcomingEntries = await this.getUpcomingEvents(date.format('YYYY-MM-DD'), 'espn_ppv');
entries = [...entries, ...upcomingEntries];
}
} catch (e) {
console.log('Could not parse ESPN events');
}
Expand Down
1 change: 1 addition & 0 deletions services/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const useSecPlus = process.env.SECPLUS?.toLowerCase() === 'true' ? true :
export const useAccN = process.env.ACCN?.toLowerCase() === 'true' ? true : false;
export const useAccNx = process.env.ACCNX?.toLowerCase() === 'true' ? true : false;
export const useLonghorn = process.env.LONGHORN?.toLowerCase() === 'true' ? true : false;
export const useEspnPpv = process.env.ESPN_PPV?.toLowerCase() === 'true' ? true : false;
export const useEspnPlus = process.env.ESPNPLUS?.toLowerCase() === 'false' ? false : true;

export const useFoxSports = process.env.FOXSPORTS?.toLowerCase() === 'true' ? true : false;
Expand Down

0 comments on commit f0ba2e9

Please sign in to comment.