Fix for not add played to database
This commit is contained in:
@@ -76,9 +76,11 @@ export default {
|
|||||||
this.currentTrackSrcFile = window.URL.createObjectURL(copyOfPlaylist[0]);
|
this.currentTrackSrcFile = window.URL.createObjectURL(copyOfPlaylist[0]);
|
||||||
/* this.$nextTick(() => {}); */
|
/* this.$nextTick(() => {}); */
|
||||||
if (!trackAddedToQue) {
|
if (!trackAddedToQue) {
|
||||||
|
if (this.addPlayed) {
|
||||||
await this.APIaddPlayed();
|
await this.APIaddPlayed();
|
||||||
}
|
}
|
||||||
await this.APIaddToQue();
|
await this.APIaddToQue();
|
||||||
|
}
|
||||||
await this.APIgetPlaylistHistory();
|
await this.APIgetPlaylistHistory();
|
||||||
|
|
||||||
this.$refs.audioPlayer.play();
|
this.$refs.audioPlayer.play();
|
||||||
@@ -131,7 +133,7 @@ export default {
|
|||||||
playWelcomeSound() {
|
playWelcomeSound() {
|
||||||
let randomNumber = Math.floor(Math.random() * 10);
|
let randomNumber = Math.floor(Math.random() * 10);
|
||||||
this.$refs.audioPlayer.pause();
|
this.$refs.audioPlayer.pause();
|
||||||
if (randomNumber == 0) {
|
if (randomNumber === 0) {
|
||||||
this.currentTrackSrcFile = "sounds/sound1.mp3";
|
this.currentTrackSrcFile = "sounds/sound1.mp3";
|
||||||
} else if (randomNumber < 5) {
|
} else if (randomNumber < 5) {
|
||||||
this.currentTrackSrcFile = "sounds/intro_short.mp3";
|
this.currentTrackSrcFile = "sounds/intro_short.mp3";
|
||||||
@@ -172,7 +174,7 @@ export default {
|
|||||||
let percentCompleted = Math.round(
|
let percentCompleted = Math.round(
|
||||||
(progressEvent.loaded * 100) / progressEvent.total
|
(progressEvent.loaded * 100) / progressEvent.total
|
||||||
);
|
);
|
||||||
if (percentCompleted % 10 == 0) {
|
if (percentCompleted % 10 === 0) {
|
||||||
//Debug for slow downloading
|
//Debug for slow downloading
|
||||||
//console.log(percentCompleted);
|
//console.log(percentCompleted);
|
||||||
}
|
}
|
||||||
@@ -202,7 +204,7 @@ export default {
|
|||||||
let percentCompleted = Math.round(
|
let percentCompleted = Math.round(
|
||||||
(progressEvent.loaded * 100) / progressEvent.total
|
(progressEvent.loaded * 100) / progressEvent.total
|
||||||
);
|
);
|
||||||
if (percentCompleted % 10 == 0) {
|
if (percentCompleted % 10 === 0) {
|
||||||
//Debug for slow downloading
|
//Debug for slow downloading
|
||||||
//console.log(percentCompleted);
|
//console.log(percentCompleted);
|
||||||
}
|
}
|
||||||
@@ -332,7 +334,7 @@ export default {
|
|||||||
footer {
|
footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0px;
|
bottom: 0;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user