Set video title when opening VLC
Fix #700 The title is set with the `--meta-title` flag to VLC.
This commit is contained in:
@@ -8,7 +8,6 @@ module.exports = {
|
||||
|
||||
var electron = require('electron')
|
||||
|
||||
var config = require('../config')
|
||||
var log = require('./log')
|
||||
var windows = require('./windows')
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user