mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
[40] template variables work in defaults
This commit is contained in:
parent
549c88bf9a
commit
e13fd63125
2 changed files with 4 additions and 5 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.16.2-develop39
|
||||
1.16.2-develop40
|
||||
|
|
|
@ -139,10 +139,9 @@ class DataFile:
|
|||
if str(dv) not in optional:
|
||||
if template["default"][dv] is not None:
|
||||
final_value = str(template["default"][dv])
|
||||
if "<<collection_name>>" in final_value:
|
||||
final_value = final_value.replace("<<collection_name>>", str(name))
|
||||
if "<<playlist_name>>" in final_value:
|
||||
final_value = final_value.replace("<<playlist_name>>", str(name))
|
||||
for key in variables:
|
||||
if f"<<{key}>>" in final_value:
|
||||
final_value = final_value.replace(f"<<{key}>>", str(name))
|
||||
default[dv] = final_value
|
||||
else:
|
||||
raise Failed(f"{self.data_type} Error: template default sub-attribute {dv} is blank")
|
||||
|
|
Loading…
Reference in a new issue