+no match

This commit is contained in:
quackerd 2021-02-18 17:13:28 -05:00
parent cfbb873fa0
commit 3d10e8558f
Signed by: d
GPG Key ID: F73412644EDE357A

View File

@ -108,12 +108,13 @@ def usage():
-c cover : cover arts page\n") -c cover : cover arts page\n")
no_match = []
def process_file(f: str, odir: str): def process_file(f: str, odir: str):
global total_cover global total_cover
global total_succ global total_succ
global total_error global total_error
global total_proc global total_proc
try: try:
print("Processing file - " + f) print("Processing file - " + f)
total_proc += 1 total_proc += 1
@ -167,6 +168,8 @@ def process_file(f: str, odir: str):
id3.add(APIC(3, "image/jpeg", 3, "Front cover", cover_arts[cover_idx][3])) id3.add(APIC(3, "image/jpeg", 3, "Front cover", cover_arts[cover_idx][3]))
total_cover += 1 total_cover += 1
print(" Written cover art - " + cover_arts[cover_idx][4]) print(" Written cover art - " + cover_arts[cover_idx][4])
else:
no_match.append(target_f)
id3.save(v2_version=3) id3.save(v2_version=3)
@ -223,5 +226,7 @@ def main():
process_directory(input_dir, output_dir) process_directory(input_dir, output_dir)
print("\nSummary - Total Files: " + str(total_proc) + " Total Errors: " + str(total_error) + " Total Covers: " + str(total_cover)) print("\nSummary - Total Files: " + str(total_proc) + " Total Errors: " + str(total_error) + " Total Covers: " + str(total_cover))
for each in no_match:
print("No match: " + each)
main() main()