diff --git a/internal/analysis/file.go b/internal/analysis/file.go index 125f36b..f7d5265 100644 --- a/internal/analysis/file.go +++ b/internal/analysis/file.go @@ -113,7 +113,16 @@ func processAudioFile(settings *conf.Settings, audioInfo *myaudio.AudioInfo) ([] if err != nil { return err } - allNotes = append(allNotes, notes...) + + // Filter notes based on included species list + var filteredNotes []datastore.Note + for _, note := range notes { + if settings.IsSpeciesIncluded(note.ScientificName) { + filteredNotes = append(filteredNotes, note) + } + } + + allNotes = append(allNotes, filteredNotes...) // advance predStart by 3 seconds - overlap predStart = predStart.Add(time.Duration((3.0 - bn.Settings.BirdNET.Overlap) * float64(time.Second)))