Show limit

This commit is contained in:
Joren 2024-12-30 16:45:56 +01:00
parent f1efb1d67c
commit 2e18921a27
Signed by: Joren
GPG Key ID: 280E33DFBC0F1B55
2 changed files with 8 additions and 5 deletions

View File

@ -7,7 +7,7 @@ EnableConsole = true
[WatchFolder]
Path = "/home/joren/dev/DRMDTool/folder"
PollingInterval = 10
UsePolling = true
UsePolling = false
UseInotify = false
[N_m3u8DLRE]

View File

@ -293,12 +293,15 @@
document.addEventListener('DOMContentLoaded', function() {
const currentSpeedLimit = "{{if .GlobalSpeedLimit}}{{.GlobalSpeedLimit}}{{else}}0{{end}}";
const speedLimitValueInput = document.getElementById('speedLimitValue');
// Extract numeric value and unit
const speedLimitUnitSelect = document.getElementById('speedLimitUnit');
const match = currentSpeedLimit.match(/(\d+(\.\d+)?)([A-Za-z]+)/);
if (match) {
speedLimitValueInput.value = match[1]; // Set the numeric value
document.getElementById('speedLimitUnit').value = match[3]; // Set the unit
speedLimitValueInput.value = match[1];
speedLimitUnitSelect.value = match[3];
} else {
speedLimitValueInput.value = "0";
speedLimitUnitSelect.value = "MBps";
}
});
</script>