diff --git a/changes/changelog.d/95.bugfix b/changes/changelog.d/95.bugfix new file mode 100644 index 000000000..fea5c947a --- /dev/null +++ b/changes/changelog.d/95.bugfix @@ -0,0 +1 @@ +Now loop properly on queue when we only have one track (#95) diff --git a/front/src/components/audio/Track.vue b/front/src/components/audio/Track.vue index e291dae78..370d8ae2d 100644 --- a/front/src/components/audio/Track.vue +++ b/front/src/components/audio/Track.vue @@ -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 {