From 4a752483c06980dbbbaeaa2d9f71e8e6f875f60a Mon Sep 17 00:00:00 2001 From: KostyaDanovsky Date: Mon, 18 Sep 2017 12:07:37 +0300 Subject: [PATCH] fix(dashboard): improve loop action for player --- .../rooms/player/player.component.ts | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/app/pages/dashboard/rooms/player/player.component.ts b/src/app/pages/dashboard/rooms/player/player.component.ts index 1965db37..499fba2e 100644 --- a/src/app/pages/dashboard/rooms/player/player.component.ts +++ b/src/app/pages/dashboard/rooms/player/player.component.ts @@ -21,20 +21,24 @@ export class PlayerComponent { } prev() { - if (this.shuffle) { - this.track = this.playerService.random(); - } else { - this.track = this.playerService.prev(); + if (!this.player.loop) { + if (this.shuffle) { + this.track = this.playerService.random(); + } else { + this.track = this.playerService.prev(); + } } this.reload(); } next() { - if (this.shuffle) { - this.track = this.playerService.random(); - } else { - this.track = this.playerService.next(); + if (!this.player.loop) { + if (this.shuffle) { + this.track = this.playerService.random(); + } else { + this.track = this.playerService.next(); + } } this.reload();