Merge branch 'ui-tweaks' of https://github.com/mcguirepr89/BirdNET-Pi into ui-tweaks
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
journalctl --no-hostname -q -o short -fu birdnet_analysis -ubirdnet_server -uextraction | sed "s/$(date "+%b %d ")//g;s/${HOME//\//\\/}\///g"
|
journalctl --no-hostname -q -o short -fu birdnet_analysis -ubirdnet_server -uextraction | sed "s/$(date "+%b %d ")//g;s/${HOME//\//\\/}\///g;/Line/d;/systemd/d;s/ .*\[.*\]: /---/"
|
||||||
|
|||||||
+2
-2
@@ -282,13 +282,13 @@ if(isset($_GET['species'])){ ?>
|
|||||||
|
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
<td class='relative'>$date $time<br>$confidence<br><img style='cursor:pointer' onclick='toggleLock(\"".$filename_formatted."\",\"".$type."\", this)' class=\"copyimage\" width=25 title=\"".$title."\" src=\"".$imageicon."\">
|
<td class='relative'>$date $time<br>$confidence<br><img style='cursor:pointer' onclick='toggleLock(\"".$filename_formatted."\",\"".$type."\", this)' class=\"copyimage\" width=25 title=\"".$title."\" src=\"".$imageicon."\">
|
||||||
<a href=\"$filename\"><img loading=\"lazy\" src=\"$filename.png\"></a>
|
<a href=\"$filename\"><img src=\"$filename.png\"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
} else {
|
} else {
|
||||||
echo "<tr>
|
echo "<tr>
|
||||||
<td class='relative'>$date $time<br>$confidence<br>
|
<td class='relative'>$date $time<br>$confidence<br>
|
||||||
<a href=\"$filename\"><img loading=\"lazy\" src=\"$filename.png\"></a>
|
<a href=\"$filename\"><img src=\"$filename.png\"></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,6 @@ sudo systemctl restart "${i}"
|
|||||||
done
|
done
|
||||||
until grep 5050 <(netstat -tulpn 2>&1);do
|
until grep 5050 <(netstat -tulpn 2>&1);do
|
||||||
sudo systemctl restart birdnet_server.service
|
sudo systemctl restart birdnet_server.service
|
||||||
sleep 20
|
sleep 30
|
||||||
done
|
done
|
||||||
sudo systemctl restart birdnet_analysis.service
|
sudo systemctl restart birdnet_analysis.service
|
||||||
|
|||||||
+5
-5
@@ -261,7 +261,7 @@ def writeResultsToFile(detections, min_conf, path):
|
|||||||
def handle_client(conn, addr):
|
def handle_client(conn, addr):
|
||||||
global INCLUDE_LIST
|
global INCLUDE_LIST
|
||||||
global EXCLUDE_LIST
|
global EXCLUDE_LIST
|
||||||
print(f"[NEW CONNECTION] {addr} connected.")
|
#print(f"[NEW CONNECTION] {addr} connected.")
|
||||||
|
|
||||||
connected = True
|
connected = True
|
||||||
while connected:
|
while connected:
|
||||||
@@ -335,7 +335,7 @@ def handle_client(conn, addr):
|
|||||||
# Get Date/Time from filename in case Pi gets behind
|
# Get Date/Time from filename in case Pi gets behind
|
||||||
#now = datetime.now()
|
#now = datetime.now()
|
||||||
full_file_name = args.i
|
full_file_name = args.i
|
||||||
print('FULL FILENAME: -' + full_file_name + '-')
|
#print('FULL FILENAME: -' + full_file_name + '-')
|
||||||
file_name = Path(full_file_name).stem
|
file_name = Path(full_file_name).stem
|
||||||
file_date = file_name.split('-birdnet-')[0]
|
file_date = file_name.split('-birdnet-')[0]
|
||||||
file_time = file_name.split('-birdnet-')[1]
|
file_time = file_name.split('-birdnet-')[1]
|
||||||
@@ -463,13 +463,13 @@ def start():
|
|||||||
global INTERPRETER, INCLUDE_LIST, EXCLUDE_LIST
|
global INTERPRETER, INCLUDE_LIST, EXCLUDE_LIST
|
||||||
INTERPRETER = loadModel()
|
INTERPRETER = loadModel()
|
||||||
server.listen()
|
server.listen()
|
||||||
print(f"[LISTENING] Server is listening on {SERVER}")
|
#print(f"[LISTENING] Server is listening on {SERVER}")
|
||||||
while True:
|
while True:
|
||||||
conn, addr = server.accept()
|
conn, addr = server.accept()
|
||||||
thread = threading.Thread(target=handle_client, args=(conn, addr))
|
thread = threading.Thread(target=handle_client, args=(conn, addr))
|
||||||
thread.start()
|
thread.start()
|
||||||
print(f"[ACTIVE CONNECTIONS] {threading.activeCount() - 1}")
|
#print(f"[ACTIVE CONNECTIONS] {threading.activeCount() - 1}")
|
||||||
|
|
||||||
|
|
||||||
print("[STARTING] server is starting...")
|
#print("[STARTING] server is starting...")
|
||||||
start()
|
start()
|
||||||
|
|||||||
Reference in New Issue
Block a user