save-and-restore-progress-for-audio fix #10 #16

Merged
artem merged 8 commits from save-and-restore-progress-for-audio into main 2023-09-19 16:34:57 +02:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 25b9b7b582 - Show all commits

View File

@ -208,7 +208,6 @@ export default {
if (item.parent.parent && item.parent.parent.tracks) { if (item.parent.parent && item.parent.parent.tracks) {
parentId = item.parent.parent._id; parentId = item.parent.parent._id;
} }
console.log(parentId);
this.$store.dispatch("user/resetProgress", parentId); this.$store.dispatch("user/resetProgress", parentId);
window.clearInterval(this.intervalProgress); window.clearInterval(this.intervalProgress);

View File

@ -154,7 +154,7 @@ export default {
this.$store.dispatch("artists/uploadNewCover", this.selectedArtist); this.$store.dispatch("artists/uploadNewCover", this.selectedArtist);
}, },
loadUserProgress() { loadUserProgress() {
if (this.selectedTrack.parent._id != this.selectedArtist._id) if (!this.isPlaying || this.selectedTrack.parent.parent._id != this.selectedArtist._id)
this.$store.dispatch("user/getProgress", this.selectedArtist); this.$store.dispatch("user/getProgress", this.selectedArtist);
} }
}, },
@ -165,6 +165,7 @@ export default {
selectedArtist: ["artists/selectedArtist"], selectedArtist: ["artists/selectedArtist"],
selectedTrack: ["tracks/selectedTrack"], selectedTrack: ["tracks/selectedTrack"],
favourites: ["user/favourites"], favourites: ["user/favourites"],
isPlaying: ["player/isPlaying"]
}), }),
cover() { cover() {
let covers = this.selectedArtist.covers; let covers = this.selectedArtist.covers;