From f7ce7545abeb9828a410afee984edc3a8ec36dbd Mon Sep 17 00:00:00 2001 From: Patrick McGuire <60325264+mcguirepr89@users.noreply.github.com> Date: Tue, 17 May 2022 15:11:52 -0400 Subject: [PATCH 1/2] iOS doesn't seem to support lazy loading on my iPhone, Safari and Chrome wouldn't load with the `loading="lazy"` method specified. Removing it fixes that -- I want to change it back for now, but then maybe figure out how to make it work on iOS ( I assume it is more resourceful to use lazy loading?) --- scripts/play.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/play.php b/scripts/play.php index 1e73cbf..91e6b1c 100644 --- a/scripts/play.php +++ b/scripts/play.php @@ -282,13 +282,13 @@ if(isset($_GET['species'])){ ?> echo " $date $time
$confidence
- + "; } else { echo " $date $time
$confidence
- + "; } From 8b8688d3d271cc4aaf346d03a5d61cf64349d017 Mon Sep 17 00:00:00 2001 From: mcguirepr89 Date: Tue, 17 May 2022 15:36:18 -0400 Subject: [PATCH 2/2] these are the changes from small_tweaks --- scripts/birdnet_log.sh | 2 +- scripts/restart_services.sh | 2 +- scripts/server.py | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/birdnet_log.sh b/scripts/birdnet_log.sh index e480664..1d49023 100755 --- a/scripts/birdnet_log.sh +++ b/scripts/birdnet_log.sh @@ -1,2 +1,2 @@ #!/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/ .*\[.*\]: /---/" diff --git a/scripts/restart_services.sh b/scripts/restart_services.sh index f0cead9..98993af 100755 --- a/scripts/restart_services.sh +++ b/scripts/restart_services.sh @@ -22,6 +22,6 @@ sudo systemctl restart "${i}" done until grep 5050 <(netstat -tulpn 2>&1);do sudo systemctl restart birdnet_server.service -sleep 20 +sleep 30 done sudo systemctl restart birdnet_analysis.service diff --git a/scripts/server.py b/scripts/server.py index 6c96e12..35833e1 100755 --- a/scripts/server.py +++ b/scripts/server.py @@ -261,7 +261,7 @@ def writeResultsToFile(detections, min_conf, path): def handle_client(conn, addr): global INCLUDE_LIST global EXCLUDE_LIST - print(f"[NEW CONNECTION] {addr} connected.") + #print(f"[NEW CONNECTION] {addr} connected.") connected = True while connected: @@ -335,7 +335,7 @@ def handle_client(conn, addr): # Get Date/Time from filename in case Pi gets behind #now = datetime.now() 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_date = file_name.split('-birdnet-')[0] file_time = file_name.split('-birdnet-')[1] @@ -463,13 +463,13 @@ def start(): global INTERPRETER, INCLUDE_LIST, EXCLUDE_LIST INTERPRETER = loadModel() server.listen() - print(f"[LISTENING] Server is listening on {SERVER}") + #print(f"[LISTENING] Server is listening on {SERVER}") while True: conn, addr = server.accept() thread = threading.Thread(target=handle_client, args=(conn, addr)) 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()