fixing a small bug

This commit is contained in:
root
2024-12-22 09:41:09 +00:00
parent ea0c7f08c1
commit 849a13f02c

View File

@@ -90,7 +90,7 @@ while (mysqli_stmt_fetch($stmt)) {
exec("curl --max-time 10 $url/api/job?apikey=$apikey > /var/www/html/user_files/" . $_SESSION["username"] . "/json.json"); exec("curl --max-time 10 $url/api/job?apikey=$apikey > /var/www/html/user_files/" . $_SESSION["username"] . "/json.json");
$fg = file_get_contents("/var/www/html/user_files/" . $_SESSION["username"] . "/json.json"); $fg = file_get_contents("/var/www/html/user_files/" . $_SESSION["username"] . "/json.json");
$json = json_decode($fg, true); $json = json_decode($fg, true);
if($json['state']=="Printing" or $system_status==99){ if($json['state']=="Printing" or $json['state']=="Printing from SD" or $system_status==99){
$printer["printer_status"]="Von anderer Quelle aus gestartet."; $printer["printer_status"]="Von anderer Quelle aus gestartet.";
$printer["progress"] = (int) $json['progress']['completion']; $printer["progress"] = (int) $json['progress']['completion'];
$printer["file"] = short_path($json["job"]["file"]["name"], 10, 10); $printer["file"] = short_path($json["job"]["file"]["name"], 10, 10);