Merge pull request #284 from vexorian/20210315_dev

20210315 dev
This commit is contained in:
vexorian 2021-03-15 00:21:02 -04:00 committed by GitHub
commit 4f80719233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 8 deletions

View File

@ -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

View File

@ -340,6 +340,7 @@ module.exports = function ($scope, $timeout, dizquetv) {
}
}
$scope.adjustZoom();
$scope.refresh();
$scope.checkUpdates = async () => {

View File

@ -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) => {

View File

@ -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>

View File

@ -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&apos;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&apos;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()">