mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-31 06:40:58 +03:00
fix squeezelite startup toggle
This commit is contained in:
@@ -194,20 +194,28 @@ $(document).ready(function(){
|
|||||||
console.log(thrownError);
|
console.log(thrownError);
|
||||||
if (thrownError != '') showMessage(thrownError, 'ERROR');
|
if (thrownError != '') showMessage(thrownError, 'ERROR');
|
||||||
}
|
}
|
||||||
});
|
complete: function(response) {
|
||||||
console.log('sent config JSON with headers:', autoexec);
|
var returnedResponse = JSON.parse(response.responseText);
|
||||||
console.log('now triggering reboot');
|
console.log(response.responseText);
|
||||||
$.ajax({
|
console.log('sent config JSON with headers:', autoexec);
|
||||||
url: '/reboot.json',
|
console.log('now triggering reboot');
|
||||||
dataType: 'text',
|
$.ajax({
|
||||||
method: 'POST',
|
url: '/reboot.json',
|
||||||
cache: false,
|
dataType: 'text',
|
||||||
contentType: 'application/json; charset=utf-8',
|
method: 'POST',
|
||||||
data: JSON.stringify({ 'timestamp': Date.now()}),
|
cache: false,
|
||||||
error: function (xhr, ajaxOptions, thrownError) {
|
contentType: 'application/json; charset=utf-8',
|
||||||
console.log(xhr.status);
|
data: JSON.stringify({ 'timestamp': Date.now()}),
|
||||||
console.log(thrownError);
|
error: function (xhr, ajaxOptions, thrownError) {
|
||||||
if (thrownError != '') showMessage(thrownError, 'ERROR');
|
console.log(xhr.status);
|
||||||
|
console.log(thrownError);
|
||||||
|
if (thrownError != '') showMessage(thrownError, 'ERROR');
|
||||||
|
}
|
||||||
|
complete: function(response) {
|
||||||
|
console.log('reboot call completed');
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user