Fix for not add played to database

This commit is contained in:
2023-01-01 12:47:14 +01:00
parent 41c8626ae2
commit aae8de8fe9

View File

@@ -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%;
}