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,20 +21,24 @@ export class PlayerComponent {
} }
prev() { prev() {
if (this.shuffle) { if (!this.player.loop) {
this.track = this.playerService.random(); if (this.shuffle) {
} else { this.track = this.playerService.random();
this.track = this.playerService.prev(); } else {
this.track = this.playerService.prev();
}
} }
this.reload(); this.reload();
} }
next() { next() {
if (this.shuffle) { if (!this.player.loop) {
this.track = this.playerService.random(); if (this.shuffle) {
} else { this.track = this.playerService.random();
this.track = this.playerService.next(); } else {
this.track = this.playerService.next();
}
} }
this.reload(); this.reload();