Use detection time instead of origin audio file time in DB

This commit is contained in:
Thibaut Voirand
2024-11-10 16:09:33 +00:00
committed by Nachtzuster
parent 7bac0d7ebe
commit 3bc2c63a1f
3 changed files with 21 additions and 25 deletions
+7 -1
View File
@@ -338,6 +338,12 @@ def run_analysis(file):
elif entry[0] not in PREDICTED_SPECIES_LIST and len(PREDICTED_SPECIES_LIST) != 0:
log.warning("Excluded as below Species Occurrence Frequency Threshold: %s", entry[0])
else:
d = Detection(time_slot.split(';')[0], time_slot.split(';')[1], entry[0], entry[1])
d = Detection(
file.file_date,
time_slot.split(';')[0],
time_slot.split(';')[1],
entry[0],
entry[1],
)
confident_detections.append(d)
return confident_detections