fix(dashboard): improve loop action for player

This commit is contained in:
KostyaDanovsky 2017-09-18 12:07:37 +03:00
parent 21339d327f
commit 4a752483c0

View file

@ -21,21 +21,25 @@ export class PlayerComponent {
} }
prev() { prev() {
if (!this.player.loop) {
if (this.shuffle) { if (this.shuffle) {
this.track = this.playerService.random(); this.track = this.playerService.random();
} else { } else {
this.track = this.playerService.prev(); this.track = this.playerService.prev();
} }
}
this.reload(); this.reload();
} }
next() { next() {
if (!this.player.loop) {
if (this.shuffle) { if (this.shuffle) {
this.track = this.playerService.random(); this.track = this.playerService.random();
} else { } else {
this.track = this.playerService.next(); this.track = this.playerService.next();
} }
}
this.reload(); this.reload();
} }