diff --git a/changes/changelog.d/91.bugfix b/changes/changelog.d/91.bugfix index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4fde544cff2d24733da3d1f2bf1a4993b8e06249 100644 --- a/changes/changelog.d/91.bugfix +++ b/changes/changelog.d/91.bugfix @@ -0,0 +1 @@ +Fixed queue skipping tracks (#91) diff --git a/changes/changelog.d/98.feature b/changes/changelog.d/98.feature new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/front/src/components/audio/Track.vue b/front/src/components/audio/Track.vue index ff177e624695edb19e26d1d879df416a4aa3e576..e291dae78a71184a8b5b129389899851be9fb61b 100644 --- a/front/src/components/audio/Track.vue +++ b/front/src/components/audio/Track.vue @@ -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) diff --git a/front/src/store/queue.js b/front/src/store/queue.js index 1725699d0ba1d78f166fd1177a5168ae83694b04..07263da63315deb04fb7d819037bbd04ff669931 100644 --- a/front/src/store/queue.js +++ b/front/src/store/queue.js @@ -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 diff --git a/front/test/unit/specs/store/queue.spec.js b/front/test/unit/specs/store/queue.spec.js index 3b970647fc163f606adc816e7c3c38848b980443..5439362dc389e1731e65e038a58c247974a816b8 100644 --- a/front/test/unit/specs/store/queue.spec.js +++ b/front/test/unit/specs/store/queue.spec.js @@ -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 } ]