Skip to content

Commit

Permalink
Search for NFL events after enabling Twitch
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Nov 29, 2024
1 parent ce5f32d commit 1c0c795
Show file tree
Hide file tree
Showing 5 changed files with 11 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.2**
Current version: **4.1.3**

# 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.2",
"version": "4.1.3",
"description": "",
"scripts": {
"start": "ts-node -r tsconfig-paths/register index.tsx",
Expand Down
4 changes: 2 additions & 2 deletions services/nfl-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {configPath} from './config';
import {useNfl} from './networks';
import {ClassTypeWithoutMethods, IEntry, IHeaders, IProvider} from './shared-interfaces';
import {db} from './database';
import {getRandomUUID} from './shared-helpers';
import {getRandomHex, getRandomUUID} from './shared-helpers';
import {useLinear} from './channels';
import {debug} from './debug';

Expand Down Expand Up @@ -602,7 +602,7 @@ class NflHandler {
headers: {
'Client-id': TWITCH_CLIENT_ID,
'User-Agent': userAgent,
'X-Device-Id': this.twitchDeviceId,
'X-Device-Id': this.twitchDeviceId || getRandomHex(),
},
},
);
Expand Down
5 changes: 5 additions & 0 deletions services/providers/nfl/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ nfl.put('/auth/:provider', async c => {
if (!enabled || provider === 'twitch') {
const {linear_channels, tokens} = await db.providers.update<IProvider<TNFLTokens>>({name: 'nfl'}, {$set: {tokens: updatedTokens}}, {returnUpdatedDocs: true});

if (provider === 'twitch' && enabled) {
// Kickoff event scheduler
await scheduleEvents();
}

return c.html(<NFLBody channels={linear_channels} enabled={true} open={false} tokens={tokens} />);
}

Expand Down

0 comments on commit 1c0c795

Please sign in to comment.