1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

add ability to configure scheduled task time limit

This commit is contained in:
Luke Pulverenti 2015-03-05 13:54:04 -05:00
parent 2fd4d6247f
commit ecd1311a59
2 changed files with 27 additions and 1 deletions

View file

@ -40,7 +40,24 @@
html += '<li>';
html += '<a href="#">';
html += '<h3>';
html += ScheduledTaskPage.getTriggerFriendlyName(trigger);
html += '</h3>';
if (trigger.MaxRuntimeMs) {
html += '<p>';
var hours = trigger.MaxRuntimeMs / 3600000;
if (hours == 1) {
html += Globalize.translate('ValueTimeLimitSingleHour');
} else {
html += Globalize.translate('ValueTimeLimitMultiHour', hours);
}
html += '</p>';
}
html += '</a>';
html += '<a href="#" onclick="ScheduledTaskPage.confirmDeleteTrigger(' + i + ');">';
@ -278,6 +295,11 @@
trigger.IntervalTicks = $('#selectInterval', page).val();
}
var timeLimit = $('#txtTimeLimit', page).val() || '0';
timeLimit = parseFloat(timeLimit) * 3600000;
trigger.MaxRuntimeMs = timeLimit || null;
return trigger;
},