Fix #95: Now loop properly on queue when we only have one track

merge-requests/154/head
Eliot Berriot 2018-02-28 18:44:23 +01:00
rodzic 8635881ad4
commit 4eb1d458d5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -0,0 +1 @@
Now loop properly on queue when we only have one track (#95)

Wyświetl plik

@ -102,9 +102,10 @@ export default {
if (this.$refs.audio) {
this.$store.dispatch('player/updateProgress', this.$refs.audio.currentTime)
}
}, 1000),
}, 250),
ended: function () {
if (this.looping === 1) {
let onlyTrack = this.$store.state.queue.tracks.length === 1
if (this.looping === 1 || (onlyTrack && this.looping === 2)) {
this.setCurrentTime(0)
this.$refs.audio.play()
} else {