mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Reload on reparse
This commit is contained in:
parent
cf4b3cd68f
commit
529d0c8a5d
@ -693,6 +693,6 @@ def reparse_scrobble(timestamp):
|
||||
}
|
||||
else:
|
||||
return {
|
||||
"status":"no-operation",
|
||||
"status":"no_operation",
|
||||
"desc":"The scrobble was not changed."
|
||||
}
|
||||
|
@ -40,7 +40,21 @@ function toggleReparseConfirm(element) {
|
||||
function reparseScrobble(id, element) {
|
||||
toggleReparseConfirm(element);
|
||||
|
||||
neo.xhttpreq("/apis/mlj_1/reparse_scrobble",data={'timestamp':id},method="POST",callback=notifyCallback,json=true);
|
||||
callback_func = function(req){
|
||||
if (req.status == 200) {
|
||||
if (req.response.status != 'no_operation') {
|
||||
window.location.reload();
|
||||
}
|
||||
else {
|
||||
notifyCallback(req);
|
||||
}
|
||||
}
|
||||
else {
|
||||
notifyCallback(req);
|
||||
}
|
||||
};
|
||||
|
||||
neo.xhttpreq("/apis/mlj_1/reparse_scrobble",data={'timestamp':id},method="POST",callback=callback_func,json=true);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user