diff --git a/src/main/external-player.js b/src/main/external-player.js index c6858120..58e4925f 100644 --- a/src/main/external-player.js +++ b/src/main/external-player.js @@ -25,7 +25,7 @@ function spawn (playerPath, url, title) { if (playerPath != null) return spawnExternal(playerPath, [url]) // Try to find and use VLC if external player is not specified - vlcCommand(function (err, vlcPath) { + vlcCommand((err, vlcPath) => { if (err) return windows.main.dispatch('externalPlayerNotFound') const args = [ '--play-and-exit', @@ -49,7 +49,7 @@ function spawnExternal (playerPath, args) { if (process.platform === 'darwin' && path.extname(playerPath) === '.app') { // Mac: Use executable in packaged .app bundle - playerPath += '/Contents/MacOS/' + path.basename(playerPath, '.app') + playerPath += `/Contents/MacOS/${path.basename(playerPath, '.app')}` } proc = cp.spawn(playerPath, args, {stdio: 'ignore'}) @@ -58,7 +58,7 @@ function spawnExternal (playerPath, args) { const closeModalTimeout = setTimeout(() => windows.main.dispatch('exitModal'), 1000) - proc.on('close', function (code) { + proc.on('close', code => { clearTimeout(closeModalTimeout) if (!proc) return // Killed log('External player exited with code ', code) @@ -70,7 +70,7 @@ function spawnExternal (playerPath, args) { proc = null }) - proc.on('error', function (e) { + proc.on('error', e => { log('External player error', e) }) }