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) {
|
function openPlayerFromActiveTorrent (state, torrentSummary, index, timeout, cb) {
|
||||||
var fileSummary = torrentSummary.files[index]
|
var fileSummary = torrentSummary.files[index]
|
||||||
|
|
||||||
@@ -241,6 +245,14 @@ function openPlayerFromActiveTorrent (state, torrentSummary, index, timeout, cb)
|
|||||||
return this.update()
|
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
|
// otherwise, play the video
|
||||||
state.window.title = torrentSummary.files[state.playing.fileIndex].name
|
state.window.title = torrentSummary.files[state.playing.fileIndex].name
|
||||||
this.update()
|
this.update()
|
||||||
|
|||||||
@@ -166,10 +166,6 @@ function updateElectron () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOpenInVlc () {
|
|
||||||
return state.saved.prefs.playInVlc
|
|
||||||
}
|
|
||||||
|
|
||||||
const dispatchHandlers = {
|
const dispatchHandlers = {
|
||||||
// Torrent list: creating, deleting, selecting torrents
|
// Torrent list: creating, deleting, selecting torrents
|
||||||
'openTorrentFile': () => ipcRenderer.send('openTorrentFile'),
|
'openTorrentFile': () => ipcRenderer.send('openTorrentFile'),
|
||||||
@@ -320,8 +316,8 @@ function escapeBack () {
|
|||||||
dispatch('toggleFullScreen')
|
dispatch('toggleFullScreen')
|
||||||
} else {
|
} else {
|
||||||
dispatch('back')
|
dispatch('back')
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Starts all torrents that aren't paused on program startup
|
// Starts all torrents that aren't paused on program startup
|
||||||
function resumeTorrents () {
|
function resumeTorrents () {
|
||||||
|
|||||||
Reference in New Issue
Block a user