Compare commits

..

No commits in common. "1f3559ab22eab1dc98527ade5c054b71a27afc20" and "ff2991cabd734336c71c180e4d18cb4bc459f8fc" have entirely different histories.

4 changed files with 2 additions and 30 deletions

View File

@ -27,7 +27,6 @@ const DEFAULTS = {
alwaysOnTop: false,
shutdownAfterFinish: 'nothing', // nothing | sleep | shutdown | restart
logFilePath: '',
sessionLog: false,
resumeQueueOnLaunch: true,
parallelUploadCount: 0, // 0 = use per-hoster limits only
scaleParallelUploads: false,

24
main.js
View File

@ -68,7 +68,7 @@ function getDefaultLogFilePath() {
return path.join(baseDir, 'fileuploader.log');
}
function getBaseLogFilePath() {
function getLogFilePath() {
const config = configStore.load();
const customPath = config && config.globalSettings
? String(config.globalSettings.logFilePath || '').trim()
@ -76,28 +76,6 @@ function getBaseLogFilePath() {
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) {
try {
const logPath = getLogFilePath();

View File

@ -1,6 +1,6 @@
{
"name": "multi-hoster-uploader",
"version": "1.8.2",
"version": "1.8.1",
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
"main": "main.js",
"scripts": {

View File

@ -1591,10 +1591,6 @@ function renderSettings() {
<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>
</div>
<div class="settings-row">
<label>Neues Log pro Session</label>
<input type="checkbox" class="settings-autosave" id="sessionLogInput" ${globalSettings.sessionLog ? 'checked' : ''}>
</div>
</div>
`;
container.appendChild(generalPanel);
@ -1697,7 +1693,6 @@ async function saveSettings(options = {}) {
const globalSettings = {
...(config.globalSettings || {}),
logFilePath: (document.getElementById('logFilePathInput')?.value || '').trim(),
sessionLog: !!document.getElementById('sessionLogInput')?.checked,
resumeQueueOnLaunch: !!document.getElementById('resumeQueueOnLaunchInput')?.checked,
parallelUploadCount: Math.max(0, Math.min(100, parseInt(document.getElementById('parallelUploadCountInput')?.value || '0', 10) || 0)),
scaleParallelUploads: !!document.getElementById('scaleParallelUploadsInput')?.checked,