Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const crypt = require('crypto');
const got = require('got');
const i18n = require('i18n');
const openSubtitles = require('opensubtitles-api');
const mi = require('mediainfo-wrapper');
const detectLang = require('detect-lang');
const OSLANGS = require('./js/utils/os-lang.json');
const PKJSON = require('../package.json');
const USERAGENT = 'OpenSubtitles-Uploader v' + PKJSON.version;
let OS;
// setup window's content and start the app
gui.start = () => {
return new Promise((resolve, reject) => {
try {
// Set up everything
Boot.load();
// if started with gulp, open devtools
if (gui.App.argv.indexOf('--development') !== -1) {
console.debug('Running in development');
win.showDevTools();
}
console.timeEnd('Application ready');
setTimeout(resolve, 200);
} catch (err) {
// if things go south on startup, just display devtools and log error
console.error(err);