From a239f0f3d56642a8af5869bfb363fb05937273bd Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Fri, 15 Jul 2022 19:30:09 -0400 Subject: [PATCH] [32] fix template None variable --- VERSION | 2 +- modules/meta.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index 49f3eaa0..0d5d0c4b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.1-develop31 +1.17.1-develop32 diff --git a/modules/meta.py b/modules/meta.py index c41e756c..2599ed0d 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -136,15 +136,13 @@ class DataFile: if not name and "name" in template: name = template["name"] + elif not name: + name = mapping_name - name_var = f"{self.data_type.lower()}_name" - if name_var not in variables: - variables[name_var] = str(name) - + variables[f"{self.data_type.lower()}_name"] = str(name) variables["library_type"] = self.library.type.lower() if self.library else "items" variables["library_name"] = self.library.name if self.library else "playlist" - for temp_key, temp_value in temp_vars.items(): if temp_value is None: optional.append(str(temp_key))