Merge branch 'dev/1.3.x' into edge
This commit is contained in:
commit
a6b3bfc9f3
@ -856,7 +856,6 @@ function api(db, channelDB, fillerDB, xmltvInterval, guideService, _m3uService,
|
||||
|
||||
res.set('Cache-Control', 'no-store')
|
||||
res.type('application/xml');
|
||||
res.attachment('xmltv.xml');
|
||||
|
||||
|
||||
let xmltvSettings = db['xmltv-settings'].find()[0];
|
||||
|
||||
@ -416,8 +416,15 @@ X-Plex-Token=${this.server.accessToken}`;
|
||||
}
|
||||
|
||||
updatePlex() {
|
||||
this.log("Updating plex status")
|
||||
axios.post(this.getStatusUrl());
|
||||
this.log("Updating plex status");
|
||||
const statusUrl = this.getStatusUrl();
|
||||
try {
|
||||
axios.post(statusUrl);
|
||||
} catch (error) {
|
||||
this.log(`Problem updating Plex status using status URL ${statusUrl}:`);
|
||||
this.log(error);
|
||||
return false;
|
||||
}
|
||||
this.currTimeMs += this.updateInterval;
|
||||
if (this.currTimeMs > this.duration) {
|
||||
this.currTimeMs = this.duration;
|
||||
|
||||
@ -325,6 +325,9 @@ module.exports = async( programs, schedule ) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (ts > t0) {
|
||||
pushFlex( ts - t0 );
|
||||
}
|
||||
while ( (t < hardLimit) && (p.length < LIMIT) ) {
|
||||
await throttle();
|
||||
//ensure t is padded
|
||||
|
||||
10
src/xmltv.js
10
src/xmltv.js
@ -105,9 +105,15 @@ async function _writeProgramme(channel, program, xw, xmlSettings, cacheImageServ
|
||||
xw.endElement()
|
||||
|
||||
xw.startElement('episode-num')
|
||||
xw.writeAttribute('system', 'xmltv_ns')
|
||||
xw.text((program.sub.season - 1) + ' . ' + (program.sub.episode - 1) + ' . 0/1')
|
||||
xw.writeAttribute('system', 'onscreen')
|
||||
xw.text( "S" + (program.sub.season) + ' E' + (program.sub.episode) )
|
||||
xw.endElement()
|
||||
|
||||
xw.startElement('episode-num')
|
||||
xw.writeAttribute('system', 'xmltv_ns')
|
||||
xw.text((program.sub.season - 1) + '.' + (program.sub.episode - 1) + '.0/1')
|
||||
xw.endElement()
|
||||
|
||||
}
|
||||
// Icon
|
||||
if (typeof program.icon !== 'undefined') {
|
||||
|
||||
@ -340,6 +340,7 @@ module.exports = function ($scope, $timeout, dizquetv) {
|
||||
}
|
||||
}
|
||||
|
||||
$scope.adjustZoom();
|
||||
$scope.refresh();
|
||||
|
||||
$scope.checkUpdates = async () => {
|
||||
|
||||
@ -397,9 +397,8 @@ module.exports = function ($timeout, $location, dizquetv, resolutionOptions) {
|
||||
adjustStartTimeToCurrentProgram();
|
||||
updateChannelDuration();
|
||||
}
|
||||
scope.removeDuplicates = () => {
|
||||
let removeDuplicatesSub = (progs) => {
|
||||
let tmpProgs = {}
|
||||
let progs = scope.channel.programs
|
||||
for (let i = 0, l = progs.length; i < l; i++) {
|
||||
if ( progs[i].type ==='redirect' ) {
|
||||
tmpProgs['_redirect ' + progs[i].channel + ' _ '+ progs[i].duration ] = progs[i];
|
||||
@ -414,7 +413,10 @@ module.exports = function ($timeout, $location, dizquetv, resolutionOptions) {
|
||||
for (let i = 0, l = keys.length; i < l; i++) {
|
||||
newProgs.push(tmpProgs[keys[i]])
|
||||
}
|
||||
scope.channel.programs = newProgs
|
||||
return newProgs;
|
||||
}
|
||||
scope.removeDuplicates = () => {
|
||||
scope.channel.programs = removeDuplicatesSub(scope.channel.programs);
|
||||
updateChannelDuration(); //oops someone forgot to add this
|
||||
}
|
||||
scope.removeOffline = () => {
|
||||
@ -1880,10 +1882,12 @@ module.exports = function ($timeout, $location, dizquetv, resolutionOptions) {
|
||||
|
||||
|
||||
scope.onTimeSlotsButtonClick = () => {
|
||||
scope.timeSlots.startDialog(scope.channel.programs, scope.maxSize, scope.channel.scheduleBackup );
|
||||
let progs = removeDuplicatesSub( scope.channel.programs );
|
||||
scope.timeSlots.startDialog( progs, scope.maxSize, scope.channel.scheduleBackup );
|
||||
}
|
||||
scope.onRandomSlotsButtonClick = () => {
|
||||
scope.randomSlots.startDialog(scope.channel.programs, scope.maxSize, scope.channel.randomScheduleBackup );
|
||||
let progs = removeDuplicatesSub( scope.channel.programs );
|
||||
scope.randomSlots.startDialog(progs, scope.maxSize, scope.channel.randomScheduleBackup );
|
||||
}
|
||||
|
||||
scope.logoOnChange = (event) => {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
</head>
|
||||
|
||||
<body ng-app="myApp" style="min-width: 340px;">
|
||||
<div class="container">
|
||||
<div class="container-fluid">
|
||||
<h1>
|
||||
<a href="#!/guide"><img id='dizquetv-logo' src="images/dizquetv.png" alt="logo" /></a>
|
||||
dizqueTV
|
||||
@ -27,7 +27,7 @@
|
||||
</a>
|
||||
</small>
|
||||
<small class="pull-right" style="padding: 5px;">
|
||||
<a href="https://discord.gg/FUpCyZBTDM" title='Discord' >
|
||||
<a href="https://discord.gg/bgD9XdDvZE" title='Discord' >
|
||||
<span class="fab fa-discord"></span>
|
||||
</a>
|
||||
</small>
|
||||
|
||||
@ -311,7 +311,7 @@
|
||||
<i class='fa fa-plus'></i> Add Flex...
|
||||
</button>
|
||||
</div>
|
||||
<p ng-show='showHelp.check'>Programs a Flex time slot. Normally you't use pad times, restrict times or add breaks to add a large quantity of Flex times at once, but this exists for more specific cases.</p>
|
||||
<p ng-show='showHelp.check'>Programs a Flex time slot. Normally you'd use pad times, restrict times or add breaks to add a large quantity of Flex times at once, but this exists for more specific cases.</p>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-6 col-lg-12" style="padding: 5px;" ng-show="hasPrograms()">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user