Disable playback controls while in external player (#909)

This commit is contained in:
Adam Gotlib
2016-09-07 22:13:50 +02:00
committed by DC
parent 8da5b955d6
commit d88229694a
3 changed files with 12 additions and 7 deletions

View File

@@ -87,7 +87,7 @@ module.exports = class PlaybackController {
// Play next file in list (if any)
nextTrack () {
const state = this.state
if (Playlist.hasNext(state)) {
if (Playlist.hasNext(state) && state.playing.location !== 'external') {
this.updatePlayer(
state.playing.infoHash, Playlist.getNextIndex(state), false, (err) => {
if (err) dispatch('error', err)
@@ -99,7 +99,7 @@ module.exports = class PlaybackController {
// Play previous track in list (if any)
previousTrack () {
const state = this.state
if (Playlist.hasPrevious(state)) {
if (Playlist.hasPrevious(state) && state.playing.location !== 'external') {
this.updatePlayer(
state.playing.infoHash, Playlist.getPreviousIndex(state), false, (err) => {
if (err) dispatch('error', err)