configs are updating
This commit is contained in:
+9
-19
@@ -166,9 +166,7 @@ if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
|
|||||||
?>
|
?>
|
||||||
<h2>Advanced Settings</h2>
|
<h2>Advanced Settings</h2>
|
||||||
<body>
|
<body>
|
||||||
<div class="row">
|
<form action="" method="POST">
|
||||||
<div class="column first">
|
|
||||||
<form action="advanced.php" method="POST">
|
|
||||||
<h3>Defaults</h3>
|
<h3>Defaults</h3>
|
||||||
<label>Full Disk Behavior: </label>
|
<label>Full Disk Behavior: </label>
|
||||||
<label for="purge">
|
<label for="purge">
|
||||||
@@ -192,7 +190,7 @@ if (strcmp($newconfig['FULL_DISK'], "purge") == 0) {
|
|||||||
<p>Set Channels to the number of channels supported by your sound card. 32 max.</p>
|
<p>Set Channels to the number of channels supported by your sound card. 32 max.</p>
|
||||||
<label for="recording_length">Recording Length: </label>
|
<label for="recording_length">Recording Length: </label>
|
||||||
<input name="recording_length" type="number" min="3" max="60" step="1" value="<?php print($newconfig['RECORDING_LENGTH']);?>" required/><br>
|
<input name="recording_length" type="number" min="3" max="60" step="1" value="<?php print($newconfig['RECORDING_LENGTH']);?>" required/><br>
|
||||||
<p>Set Recording Length in seconds between 6 and 60. Multiples of 3 are recommended, as BirdNET analyzes in 3-second chunks.</p>
|
<p>Set Recording Length in seconds between 6 and 60. Multiples of 3 are recommended, as BirdNET analyzes in 3-second chunks.</p>
|
||||||
<label for="extraction_length">Extraction Length: </label>
|
<label for="extraction_length">Extraction Length: </label>
|
||||||
<input name="extraction_length" type="number" min="3" max="<?php print($newconfig['RECORDING_LENGTH']);?>" value="<?php print($newconfig['EXTRACTION_LENGTH']);?>" /><br>
|
<input name="extraction_length" type="number" min="3" max="<?php print($newconfig['RECORDING_LENGTH']);?>" value="<?php print($newconfig['EXTRACTION_LENGTH']);?>" /><br>
|
||||||
<p>Set Extraction Length to something less than your Recording Length. Min=3 Max=Recording Length</p>
|
<p>Set Extraction Length to something less than your Recording Length. Min=3 Max=Recording Length</p>
|
||||||
@@ -212,8 +210,6 @@ foreach($formats as $format){
|
|||||||
<p>This password protects the Live Audio Stream, the Processed extractions, phpSysInfo, your Tools, and WebTerminal. When you update this value, the web server will reload, so wait about 30 seconds and then reload the page.</p>
|
<p>This password protects the Live Audio Stream, the Processed extractions, phpSysInfo, your Tools, and WebTerminal. When you update this value, the web server will reload, so wait about 30 seconds and then reload the page.</p>
|
||||||
<label for="ice_pwd">Live Audio Stream: </label>
|
<label for="ice_pwd">Live Audio Stream: </label>
|
||||||
<input name="ice_pwd" type="text" value="<?php print($newconfig['ICE_PWD']);?>" required/><br>
|
<input name="ice_pwd" type="text" value="<?php print($newconfig['ICE_PWD']);?>" required/><br>
|
||||||
</div>
|
|
||||||
<div class="column second">
|
|
||||||
<h3>Custom URLs</h3>
|
<h3>Custom URLs</h3>
|
||||||
<p>When you update any of the URL settings below, the web server will reload, so be sure to wait at least 30 seconds and then reload the page.</p>
|
<p>When you update any of the URL settings below, the web server will reload, so be sure to wait at least 30 seconds and then reload the page.</p>
|
||||||
<label for="birdnetpi_url">BirdNET-Pi URL: </label>
|
<label for="birdnetpi_url">BirdNET-Pi URL: </label>
|
||||||
@@ -236,24 +232,18 @@ foreach($formats as $format){
|
|||||||
<input name="sensitivity" type="number" min="0.5" max="1.5" step="0.01" value="<?php print($newconfig['SENSITIVITY']);?>" required/><br>
|
<input name="sensitivity" type="number" min="0.5" max="1.5" step="0.01" value="<?php print($newconfig['SENSITIVITY']);?>" required/><br>
|
||||||
<p>Min=0.5, Max=1.5</p>
|
<p>Min=0.5, Max=1.5</p>
|
||||||
<br><br>
|
<br><br>
|
||||||
<button type="submit" name="submit" class="block"><?php
|
<button type="submit" name="submit" value="advanced">
|
||||||
|
<?php
|
||||||
if(isset($_SESSION['success'])){
|
if(isset($_SESSION['success'])){
|
||||||
echo "Success!";
|
echo "Success!";
|
||||||
unset($_SESSION['success']);
|
unset($_SESSION['success']);
|
||||||
} else {
|
} else {
|
||||||
echo "Update Settings";
|
echo "Update Settings";
|
||||||
}
|
}
|
||||||
?></button>
|
?> </button>
|
||||||
<br>
|
<br>
|
||||||
</form>
|
</form>
|
||||||
<form action="config.php">
|
<form action="" method="POST">
|
||||||
<button type="submit" class="block">Basic Settings</button>
|
<button type="submit" name="view" value="Settings">Basic Settings</button>
|
||||||
</form>
|
</form>
|
||||||
<br>
|
|
||||||
<form action="index.html">
|
|
||||||
<button type="submit" class="block">Tools</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+10
-8
@@ -66,18 +66,20 @@ if (file_exists('/home/pi/BirdNET-Pi/thisrun.txt')) {
|
|||||||
<option value="labels_uk.txt">Ukrainian</option>
|
<option value="labels_uk.txt">Ukrainian</option>
|
||||||
</select>
|
</select>
|
||||||
<br><br>
|
<br><br>
|
||||||
<button type="submit" name="view" value="Settings"><?php
|
<input type="hidden" name="submit" value="settings">
|
||||||
if(isset($_POST['status'])){
|
<button type="submit" name="view" value="Settings">
|
||||||
|
<?php
|
||||||
|
if(isset($_POST['submit'])){
|
||||||
echo "Success!";
|
echo "Success!";
|
||||||
} else {
|
} else {
|
||||||
echo "Update Settings";
|
echo "Update Settings";
|
||||||
}
|
}
|
||||||
?></button>
|
?>
|
||||||
</form>
|
</button>
|
||||||
<form action="" method="POST">
|
</form>
|
||||||
<button type="submit" name="view" value="Advanced">Advanced Settings</button>
|
<form action="" method="POST">
|
||||||
</form>
|
<button type="submit" name="view" value="Advanced">Advanced Settings</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
ini_set('display_errors',1);
|
ini_set('display_errors',1);
|
||||||
|
|
||||||
|
if(isset($_POST["latitude"])){
|
||||||
$latitude = $_POST["latitude"];
|
$latitude = $_POST["latitude"];
|
||||||
$longitude = $_POST["longitude"];
|
$longitude = $_POST["longitude"];
|
||||||
$birdweather_id = $_POST["birdweather_id"];
|
$birdweather_id = $_POST["birdweather_id"];
|
||||||
@@ -32,5 +33,6 @@ if ($language != "none"){
|
|||||||
$command = "sudo -upi mv /home/pi/BirdNET-Pi/model/labels.txt /home/pi/BirdNET-Pi/model/labels.txt.old && sudo -upi unzip /home/pi/BirdNET-Pi/model/labels_l18n.zip $language -d /home/pi/BirdNET-Pi/model && sudo -upi mv /home/pi/BirdNET-Pi/model/$language /home/pi/BirdNET-Pi/model/labels.txt";
|
$command = "sudo -upi mv /home/pi/BirdNET-Pi/model/labels.txt /home/pi/BirdNET-Pi/model/labels.txt.old && sudo -upi unzip /home/pi/BirdNET-Pi/model/labels_l18n.zip $language -d /home/pi/BirdNET-Pi/model && sudo -upi mv /home/pi/BirdNET-Pi/model/$language /home/pi/BirdNET-Pi/model/labels.txt";
|
||||||
$command_output = `$command`;
|
$command_output = `$command`;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user