From aae8de8fe99081734f877bcb8ba73bea1f128da3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 1 Jan 2023 12:47:14 +0100 Subject: [PATCH] Fix for not add played to database --- cmd/frontend/src/components/layout/TheFooter.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cmd/frontend/src/components/layout/TheFooter.vue b/cmd/frontend/src/components/layout/TheFooter.vue index f128aca..f57edb4 100644 --- a/cmd/frontend/src/components/layout/TheFooter.vue +++ b/cmd/frontend/src/components/layout/TheFooter.vue @@ -76,9 +76,11 @@ export default { this.currentTrackSrcFile = window.URL.createObjectURL(copyOfPlaylist[0]); /* this.$nextTick(() => {}); */ if (!trackAddedToQue) { - await this.APIaddPlayed(); + if (this.addPlayed) { + await this.APIaddPlayed(); + } + await this.APIaddToQue(); } - await this.APIaddToQue(); await this.APIgetPlaylistHistory(); this.$refs.audioPlayer.play(); @@ -131,7 +133,7 @@ export default { playWelcomeSound() { let randomNumber = Math.floor(Math.random() * 10); this.$refs.audioPlayer.pause(); - if (randomNumber == 0) { + if (randomNumber === 0) { this.currentTrackSrcFile = "sounds/sound1.mp3"; } else if (randomNumber < 5) { this.currentTrackSrcFile = "sounds/intro_short.mp3"; @@ -172,7 +174,7 @@ export default { let percentCompleted = Math.round( (progressEvent.loaded * 100) / progressEvent.total ); - if (percentCompleted % 10 == 0) { + if (percentCompleted % 10 === 0) { //Debug for slow downloading //console.log(percentCompleted); } @@ -202,7 +204,7 @@ export default { let percentCompleted = Math.round( (progressEvent.loaded * 100) / progressEvent.total ); - if (percentCompleted % 10 == 0) { + if (percentCompleted % 10 === 0) { //Debug for slow downloading //console.log(percentCompleted); } @@ -332,7 +334,7 @@ export default { footer { display: flex; position: absolute; - bottom: 0px; + bottom: 0; justify-content: flex-end; width: 100%; }