From f2e8994b210cd20f1fea193c438a7f3924ed576e Mon Sep 17 00:00:00 2001 From: ayakael Date: Fri, 27 Jul 2018 05:32:47 -0800 Subject: [PATCH] [import_src] Fixed bug where empty ARTIST would be defined in metadata [import_src] Fixed bug where BATCHID would be defined in metadata even when no batch id was given --- src/import_src | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/import_src b/src/import_src index c0c86e8..becd5f3 100644 --- a/src/import_src +++ b/src/import_src @@ -62,7 +62,8 @@ import_src() { # Conjoins trackmetaList and addmetaList into metadataList while [[ ${COUNT} -lt ${#trackList[@]} ]]; do - local metadataList[${COUNT}]="${trackmetaList[${COUNT}]};${addmetaList[${COUNT}]};IMAGEID=${IMAGEID};BATCHID=${BATCHID}" + local metadataList[${COUNT}]="${trackmetaList[${COUNT}]};${addmetaList[${COUNT}]};IMAGEID=${IMAGEID};" + [[ -n "${BATCHID}" ]] && local metadataList[${COUNT}]="${metadataList[${COUNT}]};BATCHID=${BATCHID};" local COUNT=$(( ${COUNT} + 1 )) done