From e35dd9e5d0de009a96af70331b6c749c9b0034bf Mon Sep 17 00:00:00 2001 From: Serene-Arc Date: Mon, 12 Apr 2021 18:07:40 +1000 Subject: [PATCH] Fix bug in file name formatter --- bdfr/file_name_formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bdfr/file_name_formatter.py b/bdfr/file_name_formatter.py index 2c083c1..d6bdace 100644 --- a/bdfr/file_name_formatter.py +++ b/bdfr/file_name_formatter.py @@ -43,7 +43,7 @@ class FileNameFormatter: result = format_string for key in attributes.keys(): if re.search(fr'(?i).*{{{key}}}.*', result): - key_value = attributes.get(key, 'unknown') + key_value = str(attributes.get(key, 'unknown')) key_value = bytes(key_value, 'utf-8').decode('unicode-escape') result = re.sub(fr'(?i){{{key}}}', key_value, result,) logger.log(9, f'Found key string {key} in name')