Skip to content

Commit

Permalink
Set video title when opening VLC
Browse files Browse the repository at this point in the history
Fix #700

The title is set with the `--meta-title` flag to VLC.
  • Loading branch information
feross committed Jul 27, 2016
1 parent c2f869b commit 112600f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/main/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module.exports = {

var electron = require('electron')

var config = require('../config')
var log = require('./log')
var windows = require('./windows')

Expand Down
4 changes: 2 additions & 2 deletions src/main/ipc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/controllers/media-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down

0 comments on commit 112600f

Please sign in to comment.