diff --git a/README.md b/README.md index 2102794..93bb71b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
-Current version: **3.2.5** +Current version: **3.2.6** # About This takes ESPN/ESPN+, FOX Sports, Paramount+, MSG+, 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). @@ -70,14 +70,19 @@ Use if you would like to login with Paramount+ | GOLAZO* | Set if you would like the Golazo Network channel (only available with `LINEAR_CHANNELS`) | False | False | #### NFL+ -Use if you would like to login with NFL+ +Use if you would like to login with NFL+. + +Please note that if you only have an NFL account, you can still get events from Amazon Prime, Peacock, or your TV Provider. *** If you have access to NFL RedZone (NFL+ Premium), it will be scheduled. If `LINEAR_CHANNELS` is set, it will be on its own channel | Environment Variable | Description | Required? | Default | |---|---|---|---| | NFLPLUS | Set if you would like NFL+ events | False | False | -| NFLNETWORK* | Set if you would like the NFL Network channel (only available with `LINEAR_CHANNELS`) | False | False | +| NFL_TVE | Set if you would like NFL games from your TV Provider (not needed with NFL+) | False | False | +| NFL_PRIME | Set if you would like NFL games from Amazon Prime (not needed with NFL+) | False | False | +| NFL_PEACOCK | Set if you would like NFL games from Peacock (not needed with NFL+) | False | False | +| NFLNETWORK* | Set if you would like the NFL Network channel (only available with `LINEAR_CHANNELS`). Must have NFL+ or TV Provider. | False | False | | NFLCHANNEL* | Set if you would like the NFL Channel (only available with `LINEAR_CHANNELS`) | False | False | #### NESN diff --git a/package-lock.json b/package-lock.json index 0bef411..e22f05e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "eplustv", - "version": "3.2.5", + "version": "3.2.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "eplustv", - "version": "3.2.5", + "version": "3.2.6", "license": "MIT", "dependencies": { "axios": "^1.2.2", diff --git a/package.json b/package.json index ea81319..7e8eadc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eplustv", - "version": "3.2.5", + "version": "3.2.6", "description": "", "scripts": { "start": "ts-node index.ts", diff --git a/services/channels.ts b/services/channels.ts index 8b5065a..c1813d8 100644 --- a/services/channels.ts +++ b/services/channels.ts @@ -47,182 +47,187 @@ export const LINEAR_START_CHANNEL = nextStartChannel(startChannel + numOfChannel export const useLinear = process.env.LINEAR_CHANNELS?.toLowerCase() === 'true' ? true : false; /* eslint-disable sort-keys-custom-order-fix/sort-keys-custom-order-fix */ -export const CHANNEL_MAP = { - 0: { - canUse: useEspn1, - id: 'espn1', - logo: 'https://tmsimg.fancybits.co/assets/s32645_h3_aa.png?w=360&h=270', - name: 'ESPN', - stationId: '32645', - tvgName: 'ESPNHD', - }, - 1: { - canUse: useEspn2, - id: 'espn2', - logo: 'https://tmsimg.fancybits.co/assets/s45507_ll_h15_aa.png?w=360&h=270', - name: 'ESPN2', - stationId: '45507', - tvgName: 'ESPN2HD', - }, - 2: { - canUse: useEspnU, - id: 'espnu', - logo: 'https://tmsimg.fancybits.co/assets/s60696_ll_h15_aa.png?w=360&h=270', - name: 'ESPNU', - stationId: '60696', - tvgName: 'ESPNUHD', - }, - 3: { - canUse: useSec, - id: 'sec', - logo: 'https://tmsimg.fancybits.co/assets/s89714_ll_h15_aa.png?w=360&h=270', - name: 'SEC Network', - stationId: '89714', - tvgName: 'SECH', - }, - 4: { - canUse: useAccN, - id: 'acc', - logo: 'https://tmsimg.fancybits.co/assets/s111871_ll_h15_ac.png?w=360&h=270', - name: 'ACC Network', - stationId: '111871', - tvgName: 'ACC', - }, - 5: { - canUse: useEspnews, - id: 'espnews', - logo: 'https://tmsimg.fancybits.co/assets/s59976_ll_h15_aa.png?w=360&h=270', - name: 'ESPNews', - stationId: '59976', - tvgName: 'ESPNWHD', - }, - 10: { - canUse: useFoxSports, - id: 'fs1', - logo: 'https://tmsimg.fancybits.co/assets/s82547_ll_h15_aa.png?w=360&h=270', - name: 'FS1', - stationId: '82547', - tvgName: 'FS1HD', - }, - 11: { - canUse: useFoxSports, - id: 'fs2', - logo: 'https://tmsimg.fancybits.co/assets/s59305_ll_h15_aa.png?w=360&h=270', - name: 'FS2', - stationId: '59305', - tvgName: 'FS2HD', - }, - 12: { - canUse: useFoxSports, - id: 'btn', - logo: 'https://tmsimg.fancybits.co/assets/s58321_ll_h15_ac.png?w=360&h=270', - name: 'B1G Network', - stationId: '58321', - tvgName: 'BIG10HD', - }, - 13: { - canUse: useFoxSports, - id: 'fox-soccer-plus', - logo: 'https://tmsimg.fancybits.co/assets/s66880_ll_h15_aa.png?w=360&h=270', - name: 'FOX Soccer Plus', - stationId: '66880', - tvgName: 'FSCPLHD', - }, - 20: { - canUse: useParamount.cbsSportsHq, - id: 'cbssportshq', - logo: 'https://tmsimg.fancybits.co/assets/s108919_ll_h15_aa.png?w=360&h=270', - name: 'CBS Sports HQ', - stationId: '108919', - tvgName: 'CBSSPHQ', - }, - 21: { - canUse: useParamount.golazo, - id: 'golazo', - logo: 'https://tmsimg.fancybits.co/assets/s133691_ll_h15_aa.png?w=360&h=270', - name: 'GOLAZO Network', - stationId: '133691', - tvgName: 'GOLAZO', - }, - 30: { - canUse: useNfl.network, - id: 'NFLNETWORK', - logo: 'https://tmsimg.fancybits.co/assets/s45399_ll_h15_aa.png?w=360&h=270', - name: 'NFL Network', - stationId: '45399', - tvgName: 'NFLHD', - }, - 31: { - canUse: useNfl.redZone, - id: 'NFLNRZ', - logo: 'https://tmsimg.fancybits.co/assets/s65025_ll_h9_aa.png?w=360&h=270', - name: 'NFL RedZone', - stationId: '65025', - tvgName: 'NFLNRZD', - }, - 32: { - canUse: useNfl.channel, - id: 'NFLDIGITAL1_OO_v3', - logo: 'https://tmsimg.fancybits.co/assets/s121705_ll_h15_aa.png?w=360&h=270', - name: 'NFL Channel', - stationId: '121705', - tvgName: 'NFLDC1', - }, - 40: { - canUse: useMLBtv, - id: 'MLBTVBI', - logo: 'https://tmsimg.fancybits.co/assets/s119153_ll_h15_aa.png?w=360&h=270', - name: 'MLB Big Inning', - stationId: '119153', - tvgName: 'MLBTVBI', - }, - 50: { - canUse: useNesn, - id: 'NESN', - logo: 'https://tmsimg.fancybits.co/assets/s35038_ll_h15_ac.png?w=360&h=270', - name: 'New England Sports Network HD', - stationId: '35038', - tvgName: 'NESNHD', - }, - 51: { - canUse: useNesn, - id: 'NESN+', - logo: 'https://tmsimg.fancybits.co/assets/s63198_ll_h15_ac.png?w=360&h=270', - name: 'New England Sports Network Plus HD', - stationId: '63516', - tvgName: 'NESNPLD', - }, - 60: { - canUse: useMsgPlus, - id: 'MSG', - logo: 'https://tmsimg.fancybits.co/assets/s10979_ll_h15_ab.png?w=360&h=270', - name: 'MSG', - stationId: '10979', - tvgName: 'MSG', - }, - 61: { - canUse: useMsgPlus, - id: 'MSGSN', - logo: 'https://tmsimg.fancybits.co/assets/s11105_ll_h15_ac.png?w=360&h=270', - name: 'MSG Sportsnet HD', - stationId: '15273', - tvgName: 'MSGSNNP', - }, - 62: { - canUse: useMsgPlus, - id: 'MSG2', - logo: 'https://tmsimg.fancybits.co/assets/s70283_ll_h15_aa.png?w=360&h=270', - name: 'MSG2 HD', - stationId: '70283', - tvgName: 'MSG2HD', - }, - 63: { - canUse: useMsgPlus, - id: 'MSGSN2', - logo: 'https://tmsimg.fancybits.co/assets/s70285_ll_h15_ab.png?w=360&h=270', - name: 'MSG Sportsnet 2 HD', - stationId: '70285', - tvgName: 'MSG2SNH', +export const CHANNELS = { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + get MAP() { + return { + 0: { + canUse: useEspn1, + id: 'espn1', + logo: 'https://tmsimg.fancybits.co/assets/s32645_h3_aa.png?w=360&h=270', + name: 'ESPN', + stationId: '32645', + tvgName: 'ESPNHD', + }, + 1: { + canUse: useEspn2, + id: 'espn2', + logo: 'https://tmsimg.fancybits.co/assets/s45507_ll_h15_aa.png?w=360&h=270', + name: 'ESPN2', + stationId: '45507', + tvgName: 'ESPN2HD', + }, + 2: { + canUse: useEspnU, + id: 'espnu', + logo: 'https://tmsimg.fancybits.co/assets/s60696_ll_h15_aa.png?w=360&h=270', + name: 'ESPNU', + stationId: '60696', + tvgName: 'ESPNUHD', + }, + 3: { + canUse: useSec, + id: 'sec', + logo: 'https://tmsimg.fancybits.co/assets/s89714_ll_h15_aa.png?w=360&h=270', + name: 'SEC Network', + stationId: '89714', + tvgName: 'SECH', + }, + 4: { + canUse: useAccN, + id: 'acc', + logo: 'https://tmsimg.fancybits.co/assets/s111871_ll_h15_ac.png?w=360&h=270', + name: 'ACC Network', + stationId: '111871', + tvgName: 'ACC', + }, + 5: { + canUse: useEspnews, + id: 'espnews', + logo: 'https://tmsimg.fancybits.co/assets/s59976_ll_h15_aa.png?w=360&h=270', + name: 'ESPNews', + stationId: '59976', + tvgName: 'ESPNWHD', + }, + 10: { + canUse: useFoxSports, + id: 'fs1', + logo: 'https://tmsimg.fancybits.co/assets/s82547_ll_h15_aa.png?w=360&h=270', + name: 'FS1', + stationId: '82547', + tvgName: 'FS1HD', + }, + 11: { + canUse: useFoxSports, + id: 'fs2', + logo: 'https://tmsimg.fancybits.co/assets/s59305_ll_h15_aa.png?w=360&h=270', + name: 'FS2', + stationId: '59305', + tvgName: 'FS2HD', + }, + 12: { + canUse: useFoxSports, + id: 'btn', + logo: 'https://tmsimg.fancybits.co/assets/s58321_ll_h15_ac.png?w=360&h=270', + name: 'B1G Network', + stationId: '58321', + tvgName: 'BIG10HD', + }, + 13: { + canUse: useFoxSports, + id: 'fox-soccer-plus', + logo: 'https://tmsimg.fancybits.co/assets/s66880_ll_h15_aa.png?w=360&h=270', + name: 'FOX Soccer Plus', + stationId: '66880', + tvgName: 'FSCPLHD', + }, + 20: { + canUse: useParamount.cbsSportsHq, + id: 'cbssportshq', + logo: 'https://tmsimg.fancybits.co/assets/s108919_ll_h15_aa.png?w=360&h=270', + name: 'CBS Sports HQ', + stationId: '108919', + tvgName: 'CBSSPHQ', + }, + 21: { + canUse: useParamount.golazo, + id: 'golazo', + logo: 'https://tmsimg.fancybits.co/assets/s133691_ll_h15_aa.png?w=360&h=270', + name: 'GOLAZO Network', + stationId: '133691', + tvgName: 'GOLAZO', + }, + 30: { + canUse: useNfl.network, + id: 'NFLNETWORK', + logo: 'https://tmsimg.fancybits.co/assets/s45399_ll_h15_aa.png?w=360&h=270', + name: 'NFL Network', + stationId: '45399', + tvgName: 'NFLHD', + }, + 31: { + canUse: useNfl.redZone, + id: 'NFLNRZ', + logo: 'https://tmsimg.fancybits.co/assets/s65025_ll_h9_aa.png?w=360&h=270', + name: 'NFL RedZone', + stationId: '65025', + tvgName: 'NFLNRZD', + }, + 32: { + canUse: useNfl.channel, + id: 'NFLDIGITAL1_OO_v3', + logo: 'https://tmsimg.fancybits.co/assets/s121705_ll_h15_aa.png?w=360&h=270', + name: 'NFL Channel', + stationId: '121705', + tvgName: 'NFLDC1', + }, + 40: { + canUse: useMLBtv, + id: 'MLBTVBI', + logo: 'https://tmsimg.fancybits.co/assets/s119153_ll_h15_aa.png?w=360&h=270', + name: 'MLB Big Inning', + stationId: '119153', + tvgName: 'MLBTVBI', + }, + 50: { + canUse: useNesn, + id: 'NESN', + logo: 'https://tmsimg.fancybits.co/assets/s35038_ll_h15_ac.png?w=360&h=270', + name: 'New England Sports Network HD', + stationId: '35038', + tvgName: 'NESNHD', + }, + 51: { + canUse: useNesn, + id: 'NESN+', + logo: 'https://tmsimg.fancybits.co/assets/s63198_ll_h15_ac.png?w=360&h=270', + name: 'New England Sports Network Plus HD', + stationId: '63516', + tvgName: 'NESNPLD', + }, + 60: { + canUse: useMsgPlus, + id: 'MSG', + logo: 'https://tmsimg.fancybits.co/assets/s10979_ll_h15_ab.png?w=360&h=270', + name: 'MSG', + stationId: '10979', + tvgName: 'MSG', + }, + 61: { + canUse: useMsgPlus, + id: 'MSGSN', + logo: 'https://tmsimg.fancybits.co/assets/s11105_ll_h15_ac.png?w=360&h=270', + name: 'MSG Sportsnet HD', + stationId: '15273', + tvgName: 'MSGSNNP', + }, + 62: { + canUse: useMsgPlus, + id: 'MSG2', + logo: 'https://tmsimg.fancybits.co/assets/s70283_ll_h15_aa.png?w=360&h=270', + name: 'MSG2 HD', + stationId: '70283', + tvgName: 'MSG2HD', + }, + 63: { + canUse: useMsgPlus, + id: 'MSGSN2', + logo: 'https://tmsimg.fancybits.co/assets/s70285_ll_h15_ab.png?w=360&h=270', + name: 'MSG Sportsnet 2 HD', + stationId: '70285', + tvgName: 'MSG2SNH', + }, + }; }, }; /* eslint-enable sort-keys-custom-order-fix/sort-keys-custom-order-fix */ @@ -234,7 +239,7 @@ export const calculateChannelNumber = (channelNum: string): number | string => { return channelNum; } - const linearChannel = CHANNEL_MAP[chanNum - LINEAR_START_CHANNEL]; + const linearChannel = CHANNELS.MAP[chanNum - LINEAR_START_CHANNEL]; if (linearChannel) { return linearChannel.id; @@ -252,7 +257,7 @@ export const calculateChannelFromName = (channelName: string): number => { let channelNum = Number.MAX_SAFE_INTEGER; - _.forOwn(CHANNEL_MAP, (val, key) => { + _.forOwn(CHANNELS.MAP, (val, key) => { if (val.id === channelName) { channelNum = parseInt(key, 10) + LINEAR_START_CHANNEL; } diff --git a/services/generate-m3u.ts b/services/generate-m3u.ts index e1579a8..1a73a23 100644 --- a/services/generate-m3u.ts +++ b/services/generate-m3u.ts @@ -1,12 +1,12 @@ import _ from 'lodash'; -import {NUM_OF_CHANNELS, START_CHANNEL, CHANNEL_MAP, LINEAR_START_CHANNEL} from './channels'; +import {NUM_OF_CHANNELS, START_CHANNEL, CHANNELS, LINEAR_START_CHANNEL} from './channels'; export const generateM3u = (uri: string, linear = false): string => { let m3uFile = '#EXTM3U'; if (linear) { - _.forOwn(CHANNEL_MAP, (val, key) => { + _.forOwn(CHANNELS.MAP, (val, key) => { if (!val.canUse) { return; } diff --git a/services/generate-xmltv.ts b/services/generate-xmltv.ts index ec92deb..1a05651 100644 --- a/services/generate-xmltv.ts +++ b/services/generate-xmltv.ts @@ -4,7 +4,7 @@ import moment from 'moment'; import {db} from './database'; import {usesMultiple} from './networks'; -import {calculateChannelFromName, CHANNEL_MAP, LINEAR_START_CHANNEL, NUM_OF_CHANNELS, START_CHANNEL} from './channels'; +import {calculateChannelFromName, CHANNELS, LINEAR_START_CHANNEL, NUM_OF_CHANNELS, START_CHANNEL} from './channels'; import {IEntry} from './shared-interfaces'; const baseCategories = ['HD', 'HDTV', 'Sports event', 'Sports']; @@ -51,7 +51,7 @@ export const generateXml = async (linear = false): Promise