Skip to content

Commit 45d94c8

Browse files
author
Your Name
committed
Add a limit to the time a request can take before timing out
1 parent 8793682 commit 45d94c8

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<img src="https://i.imgur.com/FIGZdR3.png">
33
</p>
44

5-
Current version: **4.1.6**
5+
Current version: **4.1.7**
66

77
# About
88
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).

index.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {serveStatic} from '@hono/node-server/serve-static';
44
import {BlankEnv, BlankInput} from 'hono/types';
55
import {html} from 'hono/html';
66
import moment from 'moment';
7+
import axios from 'axios';
78

89
import {generateM3u} from './services/generate-m3u';
910
import {initDirectories} from './services/init-directories';
@@ -51,6 +52,9 @@ import {ESPN} from './services/providers/espn/views';
5152
import {ESPNPlus} from './services/providers/espn-plus/views';
5253
import {Gotham} from './services/providers/gotham/views';
5354

55+
// Set timeout of requests to 1 minute
56+
axios.defaults.timeout = 1000 * 60;
57+
5458
const notFound = (c: Context<BlankEnv, '', BlankInput>) => {
5559
return c.text('404 not found', 404, {
5660
'X-Tuner-Error': 'EPlusTV: Error getting content',

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eplustv",
3-
"version": "4.1.6",
3+
"version": "4.1.7",
44
"description": "",
55
"scripts": {
66
"start": "ts-node -r tsconfig-paths/register index.tsx",

services/flo-handler.ts

+2
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ class FloSportsHandler {
174174
headers: {
175175
Authorization: `Bearer ${this.access_token}`,
176176
},
177+
// This request can take a long time so increasing the timeout
178+
timeout: 1000 * 60 * 5,
177179
});
178180

179181
debug.saveRequestData(data, 'flosports', 'epg');

0 commit comments

Comments
 (0)