From 37968d96c6086d2572f5ffc00675417c7cde0771 Mon Sep 17 00:00:00 2001 From: Peter Wicks Date: Mon, 30 Dec 2024 20:49:06 -0700 Subject: [PATCH] Bug fix for empty/none Authors list --- m4binder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4binder.py b/m4binder.py index e863230..3baea01 100644 --- a/m4binder.py +++ b/m4binder.py @@ -121,7 +121,7 @@ def create_ffmetadata(files, metadata_file, book_metadata=None): if "title" in book_metadata: lines.append(f"title={book_metadata['title']}") lines.append(f"album={book_metadata['title']}") - if "authors" in book_metadata: + if "authors" in book_metadata and len(book_metadata['authors']) > 0 and book_metadata['authors'][0] is not None: lines.append(f"artist={', '.join(book_metadata['authors'])}") lines.append(f"album_artist={', '.join(book_metadata['authors'])}") if "publisher" in book_metadata: