Skip to content

Commit

Permalink
mark live programs with now airdate so dvr can record them
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Oct 20, 2021
1 parent 7b1e3af commit 12f5714
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions PlutoIPTV/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,6 @@ ${m3uUrl}
attrs: { system: "pluto" },
text: programme.episode.series._id,
},
{
name: "episode-num",
attrs: { system: "original-air-date" },
text: programme.episode.clip
? programme.episode.clip.originalReleaseDate
: null,
},
],
};

Expand All @@ -510,24 +503,37 @@ ${m3uUrl}
text: programme.episode.subGenre,
})
}
if (episodeNumberString && !isMovie) {
if (episodeNumberString && !isMovie && !isLive) {
airing.children.push({
name: "episode-num",
attrs: { system: "onscreen" },
text: episodeNumberString,
})
}
if (!isMovie) {
if (!isMovie && !isLive) {
airing.children.push({
name: "episode-num",
attrs: { system: "pluto" },
text: programme.episode._id,
})
}

let oad = programme.episode.clip ? programme.episode.clip.originalReleaseDate : null
if (isLive) {
airing.children.push({
name: "live",
})
airing.children.push({
name: "episode-num",
attrs: { system: "original-air-date" },
text: moment(programme.start).format("YYYYMMDDHHmmss ZZ"),
})
} else if (oad) {
airing.children.push({
name: "episode-num",
attrs: { system: "original-air-date" },
text: oad,
});
}

let uniqueGenres = channelsGenres.filter(function (item, pos) {
Expand Down

0 comments on commit 12f5714

Please sign in to comment.