Compare commits
No commits in common. "1f3559ab22eab1dc98527ade5c054b71a27afc20" and "ff2991cabd734336c71c180e4d18cb4bc459f8fc" have entirely different histories.
1f3559ab22
...
ff2991cabd
@ -27,7 +27,6 @@ const DEFAULTS = {
|
|||||||
alwaysOnTop: false,
|
alwaysOnTop: false,
|
||||||
shutdownAfterFinish: 'nothing', // nothing | sleep | shutdown | restart
|
shutdownAfterFinish: 'nothing', // nothing | sleep | shutdown | restart
|
||||||
logFilePath: '',
|
logFilePath: '',
|
||||||
sessionLog: false,
|
|
||||||
resumeQueueOnLaunch: true,
|
resumeQueueOnLaunch: true,
|
||||||
parallelUploadCount: 0, // 0 = use per-hoster limits only
|
parallelUploadCount: 0, // 0 = use per-hoster limits only
|
||||||
scaleParallelUploads: false,
|
scaleParallelUploads: false,
|
||||||
|
|||||||
24
main.js
24
main.js
@ -68,7 +68,7 @@ function getDefaultLogFilePath() {
|
|||||||
return path.join(baseDir, 'fileuploader.log');
|
return path.join(baseDir, 'fileuploader.log');
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBaseLogFilePath() {
|
function getLogFilePath() {
|
||||||
const config = configStore.load();
|
const config = configStore.load();
|
||||||
const customPath = config && config.globalSettings
|
const customPath = config && config.globalSettings
|
||||||
? String(config.globalSettings.logFilePath || '').trim()
|
? String(config.globalSettings.logFilePath || '').trim()
|
||||||
@ -76,28 +76,6 @@ function getBaseLogFilePath() {
|
|||||||
return customPath || getDefaultLogFilePath();
|
return customPath || getDefaultLogFilePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Session log: one file per app session, created lazily on first upload
|
|
||||||
let sessionLogPath = null;
|
|
||||||
|
|
||||||
function getLogFilePath() {
|
|
||||||
const config = configStore.load();
|
|
||||||
const useSessionLog = config && config.globalSettings && config.globalSettings.sessionLog;
|
|
||||||
if (!useSessionLog) return getBaseLogFilePath();
|
|
||||||
|
|
||||||
// Lazy: generate session log path on first call
|
|
||||||
if (!sessionLogPath) {
|
|
||||||
const base = getBaseLogFilePath();
|
|
||||||
const dir = path.dirname(base);
|
|
||||||
const ext = path.extname(base);
|
|
||||||
const name = path.basename(base, ext);
|
|
||||||
const now = new Date();
|
|
||||||
const pad = (n) => String(n).padStart(2, '0');
|
|
||||||
const ts = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}_${pad(now.getHours())}-${pad(now.getMinutes())}-${pad(now.getSeconds())}`;
|
|
||||||
sessionLogPath = path.join(dir, `${name}-${ts}${ext}`);
|
|
||||||
}
|
|
||||||
return sessionLogPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
function appendUploadLog(hoster, link, fileName) {
|
function appendUploadLog(hoster, link, fileName) {
|
||||||
try {
|
try {
|
||||||
const logPath = getLogFilePath();
|
const logPath = getLogFilePath();
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "multi-hoster-uploader",
|
"name": "multi-hoster-uploader",
|
||||||
"version": "1.8.2",
|
"version": "1.8.1",
|
||||||
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -1591,10 +1591,6 @@ function renderSettings() {
|
|||||||
<input type="text" class="key-input settings-autosave" id="logFilePathInput" value="${escapeAttr(globalSettings.logFilePath || '')}" placeholder="Standardpfad verwenden">
|
<input type="text" class="key-input settings-autosave" id="logFilePathInput" value="${escapeAttr(globalSettings.logFilePath || '')}" placeholder="Standardpfad verwenden">
|
||||||
<button class="btn btn-xs btn-secondary" id="chooseLogFilePathBtn">Ordner wählen</button>
|
<button class="btn btn-xs btn-secondary" id="chooseLogFilePathBtn">Ordner wählen</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="settings-row">
|
|
||||||
<label>Neues Log pro Session</label>
|
|
||||||
<input type="checkbox" class="settings-autosave" id="sessionLogInput" ${globalSettings.sessionLog ? 'checked' : ''}>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
container.appendChild(generalPanel);
|
container.appendChild(generalPanel);
|
||||||
@ -1697,7 +1693,6 @@ async function saveSettings(options = {}) {
|
|||||||
const globalSettings = {
|
const globalSettings = {
|
||||||
...(config.globalSettings || {}),
|
...(config.globalSettings || {}),
|
||||||
logFilePath: (document.getElementById('logFilePathInput')?.value || '').trim(),
|
logFilePath: (document.getElementById('logFilePathInput')?.value || '').trim(),
|
||||||
sessionLog: !!document.getElementById('sessionLogInput')?.checked,
|
|
||||||
resumeQueueOnLaunch: !!document.getElementById('resumeQueueOnLaunchInput')?.checked,
|
resumeQueueOnLaunch: !!document.getElementById('resumeQueueOnLaunchInput')?.checked,
|
||||||
parallelUploadCount: Math.max(0, Math.min(100, parseInt(document.getElementById('parallelUploadCountInput')?.value || '0', 10) || 0)),
|
parallelUploadCount: Math.max(0, Math.min(100, parseInt(document.getElementById('parallelUploadCountInput')?.value || '0', 10) || 0)),
|
||||||
scaleParallelUploads: !!document.getElementById('scaleParallelUploadsInput')?.checked,
|
scaleParallelUploads: !!document.getElementById('scaleParallelUploadsInput')?.checked,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user