Skip to content
Snippets Groups Projects
Commit 3db2f380 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch '95-looping-one-track' into 'develop'

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

Closes #95

See merge request funkwhale/funkwhale!72
parents 8635881a 4eb1d458
No related branches found
No related tags found
No related merge requests found
Now loop properly on queue when we only have one track (#95)
...@@ -102,9 +102,10 @@ export default { ...@@ -102,9 +102,10 @@ export default {
if (this.$refs.audio) { if (this.$refs.audio) {
this.$store.dispatch('player/updateProgress', this.$refs.audio.currentTime) this.$store.dispatch('player/updateProgress', this.$refs.audio.currentTime)
} }
}, 1000), }, 250),
ended: function () { 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.setCurrentTime(0)
this.$refs.audio.play() this.$refs.audio.play()
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment