merged with latest master
This commit is contained in:
@@ -197,6 +197,10 @@ function openPlayer (state, infoHash, index, cb) {
|
||||
}
|
||||
}
|
||||
|
||||
function getOpenInVlc () {
|
||||
return state.saved.prefs.playInVlc
|
||||
}
|
||||
|
||||
function openPlayerFromActiveTorrent (state, torrentSummary, index, timeout, cb) {
|
||||
var fileSummary = torrentSummary.files[index]
|
||||
|
||||
@@ -241,6 +245,14 @@ function openPlayerFromActiveTorrent (state, torrentSummary, index, timeout, cb)
|
||||
return this.update()
|
||||
}
|
||||
|
||||
// play in VLC if set as default player (Preferences / Playback / Play in VLC)
|
||||
if (getOpenInVlc()) {
|
||||
dispatch('vlcPlay')
|
||||
this.update()
|
||||
cb()
|
||||
return
|
||||
}
|
||||
|
||||
// otherwise, play the video
|
||||
state.window.title = torrentSummary.files[state.playing.fileIndex].name
|
||||
this.update()
|
||||
|
||||
@@ -166,10 +166,6 @@ function updateElectron () {
|
||||
}
|
||||
}
|
||||
|
||||
function getOpenInVlc () {
|
||||
return state.saved.prefs.playInVlc
|
||||
}
|
||||
|
||||
const dispatchHandlers = {
|
||||
// Torrent list: creating, deleting, selecting torrents
|
||||
'openTorrentFile': () => ipcRenderer.send('openTorrentFile'),
|
||||
@@ -320,8 +316,8 @@ function escapeBack () {
|
||||
dispatch('toggleFullScreen')
|
||||
} else {
|
||||
dispatch('back')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Starts all torrents that aren't paused on program startup
|
||||
function resumeTorrents () {
|
||||
|
||||
Reference in New Issue
Block a user