Skip to content

Commit

Permalink
Fix issue with B1G
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Oct 12, 2024
1 parent 98301fe commit 505bbc2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 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: **3.3.0**
Current version: **3.3.1**

# About
This takes ESPN/ESPN+, FOX Sports, Paramount+, MSG+, NFL+, B1G+, NESN, Mountain West, FloSports, CBS Sports, 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": "3.3.0",
"version": "3.3.1",
"description": "",
"scripts": {
"start": "ts-node index.ts",
Expand Down
20 changes: 15 additions & 5 deletions services/b1g-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ interface IEventContent {

interface IB1GEvent {
id: number;
title?: string;
startTime: string;
category1: IEventCategory;
category2: IEventCategory;
Expand Down Expand Up @@ -72,16 +73,25 @@ const getEventData = (event: IB1GEvent): IGameData => {
}
});

const awayTeam = `${event.awayCompetitor.name} ${event.awayCompetitor.fullName}`;
const homeTeam = `${event.homeCompetitor.name} ${event.homeCompetitor.fullName}`;
let awayTeam: string;
let homeTeam: string;

categories.push(awayTeam);
categories.push(homeTeam);
try {
awayTeam = `${event.awayCompetitor.name} ${event.awayCompetitor.fullName}`;
categories.push(awayTeam);
} catch (e) {}

try {
homeTeam = `${event.homeCompetitor.name} ${event.homeCompetitor.fullName}`;
categories.push(homeTeam);
} catch (e) {}

const eventName = event.title ? event.title : `${awayTeam} at ${homeTeam}`;

return {
categories: [...new Set(categories)],
image: `https://www.bigtenplus.com/image/original/${event.images[0].path}`,
name: `${awayTeam} vs ${homeTeam}`,
name: eventName,
sport,
};
};
Expand Down

0 comments on commit 505bbc2

Please sign in to comment.