linted
This commit is contained in:
+4
-4
@@ -1,4 +1,3 @@
|
|||||||
import apprise
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from tzlocal import get_localzone
|
from tzlocal import get_localzone
|
||||||
import datetime
|
import datetime
|
||||||
@@ -50,6 +49,7 @@ with open(userDir + '/BirdNET-Pi/scripts/thisrun.txt', 'r') as f:
|
|||||||
audiofmt = "." + str(str(str([i for i in this_run if i.startswith('AUDIOFMT')]).split('=')[1]).split('\\')[0])
|
audiofmt = "." + str(str(str([i for i in this_run if i.startswith('AUDIOFMT')]).split('=')[1]).split('\\')[0])
|
||||||
priv_thresh = float("." + str(str(str([i for i in this_run if i.startswith('PRIVACY_THRESHOLD')]).split('=')[1]).split('\\')[0])) / 10
|
priv_thresh = float("." + str(str(str([i for i in this_run if i.startswith('PRIVACY_THRESHOLD')]).split('=')[1]).split('\\')[0])) / 10
|
||||||
|
|
||||||
|
|
||||||
def loadModel():
|
def loadModel():
|
||||||
|
|
||||||
global INPUT_LAYER_INDEX
|
global INPUT_LAYER_INDEX
|
||||||
@@ -389,8 +389,8 @@ def handle_client(conn, addr):
|
|||||||
try:
|
try:
|
||||||
con = sqlite3.connect(userDir + '/BirdNET-Pi/scripts/birds.db')
|
con = sqlite3.connect(userDir + '/BirdNET-Pi/scripts/birds.db')
|
||||||
cur = con.cursor()
|
cur = con.cursor()
|
||||||
cur.execute("INSERT INTO detections VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", (Date, Time,
|
cur.execute("INSERT INTO detections VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", (Date, Time,
|
||||||
Sci_Name, Com_Name, str(score), Lat, Lon, Cutoff, Week, Sens, Overlap, File_Name))
|
Sci_Name, Com_Name, str(score), Lat, Lon, Cutoff, Week, Sens, Overlap, File_Name, "UNVERIFIED"))
|
||||||
|
|
||||||
con.commit()
|
con.commit()
|
||||||
con.close()
|
con.close()
|
||||||
@@ -398,7 +398,7 @@ def handle_client(conn, addr):
|
|||||||
except BaseException:
|
except BaseException:
|
||||||
print("Database busy")
|
print("Database busy")
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
# Apprise of detection if not already alerted this run.
|
# Apprise of detection if not already alerted this run.
|
||||||
if not entry[0] in species_apprised_this_run:
|
if not entry[0] in species_apprised_this_run:
|
||||||
settings_dict = config_to_settings(userDir + '/BirdNET-Pi/scripts/thisrun.txt')
|
settings_dict = config_to_settings(userDir + '/BirdNET-Pi/scripts/thisrun.txt')
|
||||||
|
|||||||
Reference in New Issue
Block a user