Set video title when opening VLC

Fix #700

The title is set with the `--meta-title` flag to VLC.
This commit is contained in:
Feross Aboukhadijeh
2016-07-27 14:44:30 -07:00
parent c2f869b362
commit 112600f5c3
3 changed files with 3 additions and 4 deletions

View File

@@ -115,8 +115,8 @@ function init () {
})
})
ipc.on('vlcPlay', function (e, url) {
var args = ['--play-and-exit', '--video-on-top', '--no-video-title-show', '--quiet', url]
ipc.on('vlcPlay', function (e, url, title) {
var args = ['--play-and-exit', '--video-on-top', '--no-video-title-show', '--quiet', `--meta-title=${title}`, url]
log('Running vlc ' + args.join(' '))
vlc.spawn(args, function (err, proc) {