From 196935c3fe3ceab4c3670e8606c4cffdc7e193bd Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 27 Jul 2016 14:44:30 -0700 Subject: [PATCH] Set video title when opening VLC Fix #700 The title is set with the `--meta-title` flag to VLC. --- src/main/ipc.js | 4 ++-- src/renderer/controllers/media-controller.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/ipc.js b/src/main/ipc.js index 99b76a6a00..eb4ba87666 100644 --- a/src/main/ipc.js +++ b/src/main/ipc.js @@ -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) { diff --git a/src/renderer/controllers/media-controller.js b/src/renderer/controllers/media-controller.js index 785b168bc9..1de07781bc 100644 --- a/src/renderer/controllers/media-controller.js +++ b/src/renderer/controllers/media-controller.js @@ -43,7 +43,7 @@ module.exports = class MediaController { } vlcPlay () { - ipcRenderer.send('vlcPlay', this.state.server.localURL) + ipcRenderer.send('vlcPlay', this.state.server.localURL, this.state.window.title) this.state.playing.location = 'vlc' }