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

Merge branch '98-stop-radio-clear' into 'develop'

Resolve "Stop radio when clearing track"

Closes #98

See merge request funkwhale/funkwhale!71
parents bb1cfd56 f40eefcd
No related branches found
No related tags found
No related merge requests found
Fixed queue skipping tracks (#91)
......@@ -19,7 +19,7 @@
import {mapState} from 'vuex'
import url from '@/utils/url'
import formats from '@/audio/formats'
import _ from 'lodash'
// import logger from '@/logging'
export default {
......@@ -98,11 +98,11 @@ export default {
}
}
},
updateProgress: function () {
updateProgress: _.throttle(function () {
if (this.$refs.audio) {
this.$store.dispatch('player/updateProgress', this.$refs.audio.currentTime)
}
},
}, 1000),
ended: function () {
if (this.looping === 1) {
this.setCurrentTime(0)
......
......@@ -133,8 +133,8 @@ export default {
}
},
clean ({dispatch, commit}) {
dispatch('radios/stop', null, {root: true})
dispatch('player/stop', null, {root: true})
// radios.stop()
commit('tracks', [])
dispatch('currentIndex', -1)
// so we replay automatically on next track append
......
......@@ -308,6 +308,7 @@ describe('store/queue', () => {
{ type: 'ended', payload: true }
],
expectedActions: [
{ type: 'radios/stop', payload: null, options: {root: true} },
{ type: 'player/stop', payload: null, options: {root: true} },
{ type: 'currentIndex', payload: -1 }
]
......
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