Release Multi-Hoster Uploader 3.3.108

This commit is contained in:
Sucukdeluxe
2026-08-01 17:46:29 +02:00
commit 6d0ad84d2d
90 changed files with 29450 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
(function (root) {
'use strict';
function selectOrphanTmps(fileNames, opts) {
const o = opts || {};
const baseName = String(o.baseName || '');
const currentPid = o.currentPid;
const isAlive = typeof o.isAlive === 'function' ? o.isAlive : () => false;
const out = [];
if (!baseName || !Array.isArray(fileNames)) return out;
const prefix = baseName + '.';
const suffix = '.tmp';
for (const file of fileNames) {
if (typeof file !== 'string') continue;
if (!file.startsWith(prefix) || !file.endsWith(suffix)) continue;
const mid = file.slice(prefix.length, file.length - suffix.length);
if (!/^\d+$/.test(mid)) continue;
const pid = Number(mid);
if (pid === currentPid) continue;
if (isAlive(pid)) continue;
out.push(file);
}
return out;
}
const api = { selectOrphanTmps };
if (typeof module !== 'undefined' && module.exports) module.exports = api;
else if (root) root.OrphanTmp = api;
})(typeof window !== 'undefined' ? window : this);