Skip to content

A live bird collage card for your Home Assistant dashboard.

add rtsp ID to extracted birdsong file name

Jon Gelsey0faf2db6a2bb
diff --git a/scripts/utils/reporting.py b/scripts/utils/reporting.py
index b2393f45..ac0e0099 100644
--- a/scripts/utils/reporting.py
+++ b/scripts/utils/reporting.py
@@ -63,7 +63,7 @@ def spectrogram(in_file, title, comment, raw=False):
def extract_detection(file: ParseFileName, detection: Detection):
conf = get_settings()
- new_file_name = f'{detection.common_name_safe}-{detection.confidence_pct}-{detection.date}-birdnet-{detection.time}.{conf["AUDIOFMT"]}'
+ new_file_name = f'{detection.common_name_safe}-{detection.confidence_pct}-{detection.date}-birdnet-{file.RTSP_id}{detection.time}.{conf["AUDIOFMT"]}'
new_dir = os.path.join(conf['EXTRACTED'], 'By_Date', f'{detection.date}', f'{detection.common_name_safe}')
new_file = os.path.join(new_dir, new_file_name)
if os.path.isfile(new_file):