Closed pursuk closed 2 years ago
Thanks for the tip! I changed it to this
def prelim_fingerprint_checks(ada_obj, target_file, directory_path):
all_against_files = audalign.filehandler.find_files(directory_path)
all_against_files_full = [x[0] for x in all_against_files]
all_against_files_base = [os.path.basename(x) for x in all_against_files_full]
if (
os.path.basename(target_file) in all_against_files_base
and target_file not in all_against_files_full
):
for i, x in enumerate(all_against_files_full):
if os.path.basename(target_file) == os.path.basename(x):
all_against_files_full.pop(i)
break
all_against_files_full.append(target_file)
elif os.path.basename(target_file) not in all_against_files_base:
all_against_files_full.append(target_file)
return all_against_files_full
And I reworked the function that calls it a little bit too. I'll have the new release out in a couple of hours
Could be me being bad at programming but this change seems to solve the issue i had with target_align