1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-29 06:17:40 +00:00

mp3 player was missing the csrf_token

This commit is contained in:
Olivier
2022-10-11 19:50:23 +09:00
parent 3d59a78c9f
commit adfbd447ed
2 changed files with 12 additions and 3 deletions

View File

@@ -177,6 +177,9 @@
whileplaying: function () {
// get csrf_token
let csrf_token = $("input[name='csrf_token']").val();
//This sends a bookmark update to calibreweb every 30 seconds.
if (this.progressBuffer == undefined) {
@@ -187,7 +190,10 @@
$.ajax(calibre.bookmarkUrl, {
method: "post",
data: { bookmark: this.position }
data: {
csrf_token: csrf_token,
bookmark: this.position
}
}).fail(function (xhr, status, error) {
console.error(error);
});
@@ -313,14 +319,14 @@
},
onstop: function () {
$.ajax(calibre.bookmarkUrl, {
method: "post",
data: { bookmark: this.position }
}).fail(function (xhr, status, error) {
console.error(error);
});
utils.css.remove(dom.o, 'playing');
},