Skip to content

Commit

Permalink
Fix issue with FOX 4K streams
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ngr31 committed Jan 14, 2024
1 parent 496d0fb commit c7a962b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 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.3**
Current version: **2.1.4**

# 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.3",
"version": "2.1.4",
"description": "",
"scripts": {
"start": "ts-node index.ts",
Expand Down
36 changes: 19 additions & 17 deletions services/playlist-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,25 +133,27 @@ export class PlaylistHandler {

const playlist = HLS.parse(clonedManifest);

const audioTracks = [...manifest.matchAll(reAudioTrack)];
audioTracks.forEach(track => {
if (track && track[1]) {
const fullChunklistUrl = parseReplacementUrl(track[1], realManifestUrl);

const chunklistName = cacheLayer.getChunklistFromUrl(`${fullChunklistUrl}${urlParams}`);
updatedManifest = updatedManifest.replace(track[1], `${this.baseProxyUrl}${chunklistName}.m3u8`);
}
});
if (this.network !== 'foxsports') {
const audioTracks = [...manifest.matchAll(reAudioTrack)];
audioTracks.forEach(track => {
if (track && track[1]) {
const fullChunklistUrl = parseReplacementUrl(track[1], realManifestUrl);

const chunklistName = cacheLayer.getChunklistFromUrl(`${fullChunklistUrl}${urlParams}`);
updatedManifest = updatedManifest.replace(track[1], `${this.baseProxyUrl}${chunklistName}.m3u8`);
}
});

const subTracks = [...manifest.matchAll(reSubMap)];
subTracks.forEach(track => {
if (track && track[1]) {
const fullChunklistUrl = parseReplacementUrl(track[1], realManifestUrl);
const subTracks = [...manifest.matchAll(reSubMap)];
subTracks.forEach(track => {
if (track && track[1]) {
const fullChunklistUrl = parseReplacementUrl(track[1], realManifestUrl);

const chunklistName = cacheLayer.getChunklistFromUrl(`${fullChunklistUrl}${urlParams}`);
updatedManifest = updatedManifest.replace(track[1], `${this.baseProxyUrl}${chunklistName}.m3u8`);
}
});
const chunklistName = cacheLayer.getChunklistFromUrl(`${fullChunklistUrl}${urlParams}`);
updatedManifest = updatedManifest.replace(track[1], `${this.baseProxyUrl}${chunklistName}.m3u8`);
}
});
}

playlist.variants.forEach(variant => {
const fullChunklistUrl = parseReplacementUrl(variant.uri, realManifestUrl);
Expand Down

0 comments on commit c7a962b

Please sign in to comment.