Eslint
This commit is contained in:
parent
9ef4d43674
commit
6122a3eaa0
4 changed files with 4 additions and 6 deletions
|
|
@ -76,7 +76,7 @@ if (!process.env.TEST) {
|
|||
fs.mkdirSync(logFolder);
|
||||
if (fs.existsSync(path.join(logFolder, 'latest.log')))
|
||||
fs.renameSync(path.join(logFolder, 'latest.log'), path.join(logFolder, `${Date.now()}.log`));
|
||||
return new Console(fs.createWriteStream(path.join(logFolder, `latest.log`)));
|
||||
return new Console(fs.createWriteStream(path.join(logFolder, 'latest.log')));
|
||||
})();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export default (window: BrowserWindow) => {
|
|||
return ev.returnValue = false;
|
||||
handler = undefined;
|
||||
ev.returnValue = true;
|
||||
})
|
||||
});
|
||||
|
||||
ipcMain.handle('type', async () => handler === undefined ? undefined : handler instanceof Funimation ? 'funi' : 'crunchy');
|
||||
ipcMain.handle('auth', async (_, data) => handler?.auth(data));
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export default class Base {
|
|||
makeProgressHandler(videoInfo: DownloadInfo) {
|
||||
return ((data: ProgressData) => {
|
||||
const progress = (typeof data.percent === 'string' ?
|
||||
parseFloat(data.percent) : data.percent) / 100;
|
||||
parseFloat(data.percent) : data.percent) / 100;
|
||||
this.window.setProgressBar(progress === 1 ? -1 : progress);
|
||||
this.sendMessage({
|
||||
name: 'progress',
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import { ArgvType } from './module.app-args';
|
||||
import { workingDir } from './module.cfg-loader';
|
||||
|
||||
const workingDir = (process as NodeJS.Process & {
|
||||
pkg?: unknown
|
||||
}).pkg ? path.dirname(process.execPath) : path.join(__dirname, '/..');
|
||||
export const archiveFile = path.join(workingDir, 'config', 'archive.json');
|
||||
|
||||
export type ItemType = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue