Selaa lähdekoodia

Less than 1 segment protecion

Gamaliel Espinoza 6 vuotta sitten
vanhempi
commit
4e99b20f1a
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      ondemand/service.py

+ 3 - 0
ondemand/service.py

@@ -154,6 +154,9 @@ def find_repetitions(results, segments_needed=2):
     expect_space = False
     expect_space = False
     found = []
     found = []
 
 
+    if segments_needed < 1:
+        segments_needed = 1
+
     for index, result in enumerate(results):
     for index, result in enumerate(results):
         if not expect_space:
         if not expect_space:
             if result['confidence'] > threshold:
             if result['confidence'] > threshold: