Compare commits
No commits in common. "59dbd4b41c95859b02591e1c8a423a546a962d40" and "7f7da8a619c9e289c588b6a9639007f55c6e554a" have entirely different histories.
59dbd4b41c
...
7f7da8a619
24
main.js
24
main.js
@ -1,6 +1,6 @@
|
||||
process.env.UV_THREADPOOL_SIZE = process.env.UV_THREADPOOL_SIZE || '64';
|
||||
const { monitorEventLoopDelay } = require('perf_hooks');
|
||||
const { app, BrowserWindow, ipcMain, dialog, clipboard, nativeTheme, Tray, Menu, nativeImage } = require('electron');
|
||||
const { app, BrowserWindow, ipcMain, dialog, clipboard, nativeTheme, Tray, Menu } = require('electron');
|
||||
nativeTheme.themeSource = 'dark';
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
@ -225,7 +225,7 @@ function _maybeLogEventLoopDelay(activeJobs) {
|
||||
upStr = ` active-by-hoster={${byHoster}} transient-errs=${d.transientErrors || 0} pending=${d.pending || 0}`;
|
||||
}
|
||||
} catch {}
|
||||
logInfo(`eventloop-delay active=${activeJobs} mean=${mean}ms p99=${p99}ms max=${max}ms stddev=${stddev}ms threadpool=${process.env.UV_THREADPOOL_SIZE}${cpuStr}${resStr}${upStr}`);
|
||||
logInfo('perf', `eventloop-delay active=${activeJobs} mean=${mean}ms p99=${p99}ms max=${max}ms stddev=${stddev}ms threadpool=${process.env.UV_THREADPOOL_SIZE}${cpuStr}${resStr}${upStr}`);
|
||||
_eventLoopDelay.reset();
|
||||
} catch {}
|
||||
}
|
||||
@ -1220,20 +1220,8 @@ function createWindow() {
|
||||
}
|
||||
|
||||
function createTray() {
|
||||
try {
|
||||
const candidates = [
|
||||
path.join(process.resourcesPath || __dirname, 'assets', 'app_icon.ico'),
|
||||
path.join(__dirname, 'assets', 'app_icon.ico'),
|
||||
path.join(__dirname, 'assets', 'icon.png')
|
||||
];
|
||||
let icon = null;
|
||||
for (const p of candidates) {
|
||||
try {
|
||||
const img = nativeImage.createFromPath(p);
|
||||
if (img && !img.isEmpty()) { icon = img; break; }
|
||||
} catch {}
|
||||
}
|
||||
tray = new Tray(icon || nativeImage.createEmpty());
|
||||
const iconPath = path.join(__dirname, 'assets', 'app_icon.ico');
|
||||
tray = new Tray(iconPath);
|
||||
tray.setToolTip('Multi-Hoster-Upload');
|
||||
|
||||
const contextMenu = Menu.buildFromTemplate([
|
||||
@ -1246,10 +1234,6 @@ function createTray() {
|
||||
tray.on('click', () => {
|
||||
if (mainWindow) { mainWindow.show(); mainWindow.focus(); }
|
||||
});
|
||||
} catch (err) {
|
||||
tray = null;
|
||||
debugLog(`createTray failed (non-fatal): ${err && err.message ? err.message : err}`);
|
||||
}
|
||||
}
|
||||
|
||||
function updateTrayTooltip(text) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "multi-hoster-uploader",
|
||||
"version": "3.3.96",
|
||||
"version": "3.3.95",
|
||||
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
@ -33,9 +33,7 @@
|
||||
"main.js",
|
||||
"preload.js",
|
||||
"lib/**/*",
|
||||
"renderer/**/*",
|
||||
"assets/app_icon.ico",
|
||||
"assets/app_icon.png"
|
||||
"renderer/**/*"
|
||||
],
|
||||
"win": {
|
||||
"target": [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user