Skip to content

Commit

Permalink
Added Pre-Game events for MSG+
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ngr31 committed Jan 16, 2024
1 parent c7a962b commit 920b772
Show file tree
Hide file tree
Showing 4 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: **2.1.4**
Current version: **2.1.5**

# About
This takes ESPN/ESPN+, FOX Sports, Paramount+, MSG+, 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) 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": "2.1.4",
"version": "2.1.5",
"description": "",
"scripts": {
"start": "ts-node index.ts",
Expand Down
9 changes: 7 additions & 2 deletions services/msg-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ const parseAirings = async (events: any[]) => {

if (!entryExists) {
const start = moment(event.start);
const end = moment(event.end).add(1, 'hour');
let end: moment.Moment = moment(event.end);

// Don't extend pre-game shows by an hour
if (!(event.title as string).endsWith(' Pre Game')) {
end = moment(event.end).add(1, 'hour');
}

if (end.isBefore(now) || start.isAfter(inTwoDays)) {
continue;
Expand Down Expand Up @@ -237,7 +242,7 @@ class MSGHandler {

(data.data || []).forEach(channel => {
(channel.airing || []).forEach(airing => {
if (airing.ev_live === 'true' && airing.ca_ty === 'game') {
if (airing.ev_live === 'true' && (airing.ca_ty === 'game' || airing.ca_ty === 'pregame')) {
entries.push({
artwork: `https://image-resizer-cloud-cdn.api.msgncms.quickplay.com/image/${airing.cid}/3-16x9.png?width=400`,
categories: ['MSG', 'MSG+', 'HD', 'Sports', airing?.pgm?.spt_lg, airing?.pgm?.spt_ty],
Expand Down

0 comments on commit 920b772

Please sign in to comment.