reset progress for artists if playing is done
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
724f35dfb1
commit
733b8eee91
@ -203,8 +203,13 @@ export default {
|
|||||||
this.audio.play();
|
this.audio.play();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
reset(container) {
|
reset(item) {
|
||||||
this.$store.dispatch("user/resetProgress", container);
|
let parentId = item.parent._id;
|
||||||
|
if (item.parent.parent && item.parent.parent.tracks) {
|
||||||
|
parentId = item.parent.parent._id;
|
||||||
|
}
|
||||||
|
console.log(parentId);
|
||||||
|
this.$store.dispatch("user/resetProgress", parentId);
|
||||||
|
|
||||||
window.clearInterval(this.intervalProgress);
|
window.clearInterval(this.intervalProgress);
|
||||||
window.clearInterval(this.intervalState);
|
window.clearInterval(this.intervalState);
|
||||||
|
@ -98,12 +98,12 @@ export default {
|
|||||||
parent.progress = res.data;
|
parent.progress = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
resetProgress(context, item) {
|
resetProgress(context, parentId) {
|
||||||
if (context.state._id == -1) {
|
if (context.state._id == -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
axios
|
axios
|
||||||
.delete(context.rootGetters.server + "/api/user/progress/" + item.album_id, context.rootGetters.headers);
|
.delete(context.rootGetters.server + "/api/user/progress/" + parentId, context.rootGetters.headers);
|
||||||
},
|
},
|
||||||
savePlayerSettings(context) {
|
savePlayerSettings(context) {
|
||||||
let body = {
|
let body = {
|
||||||
|
Loading…
Reference in New Issue
Block a user