add rtsp ID to extracted birdsong file name

This commit is contained in:
Jon Gelsey
2024-11-28 12:06:13 -08:00
committed by Nachtzuster
parent abcbcb6018
commit 0faf2db6a2
+1 -1
View File
@@ -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):