|
@@ -98,9 +98,11 @@ def process_segment(item):
|
|
print('cannot fingerprint: {}'.format(ex))
|
|
print('cannot fingerprint: {}'.format(ex))
|
|
|
|
|
|
# 2. Read the list of files from local database
|
|
# 2. Read the list of files from local database
|
|
|
|
+ audios_counter = 0
|
|
results = []
|
|
results = []
|
|
for path, name, ts in iterate_audios(date, station):
|
|
for path, name, ts in iterate_audios(date, station):
|
|
print(path)
|
|
print(path)
|
|
|
|
+ audios_counter += os.path.isfile(path)
|
|
for match in dejavu.recognize(recognizer, path, 5,
|
|
for match in dejavu.recognize(recognizer, path, 5,
|
|
ads_filter=[md5hash]):
|
|
ads_filter=[md5hash]):
|
|
try:
|
|
try:
|
|
@@ -121,6 +123,8 @@ def process_segment(item):
|
|
item['id'],
|
|
item['id'],
|
|
None, # TODO: send results again
|
|
None, # TODO: send results again
|
|
found=find_repetitions(results),
|
|
found=find_repetitions(results),
|
|
|
|
+ missing_files=(12 - audios_counter) \
|
|
|
|
+ if audios_counter < 12 else 0
|
|
)
|
|
)
|
|
|
|
|
|
print("api response: {}".format(response))
|
|
print("api response: {}".format(response))
|