merged with latest master

This commit is contained in:
Alberto Miranda
2016-07-17 20:57:06 -03:00
parent c7626997de
commit 7677bff6d4
2 changed files with 13 additions and 5 deletions

View File

@@ -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()