mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-25 05:50:21 +00:00
don't process sort_name or sort_mapping repeatedly
Once they're set, they should be left alone. Maybe doing this in one loop isn't the clearest way to do it.
This commit is contained in:
parent
6c87b93030
commit
aca30dadea
1 changed files with 2 additions and 2 deletions
|
@ -447,9 +447,9 @@ class DataFile:
|
||||||
prefix = template["move_collection_prefix"]
|
prefix = template["move_collection_prefix"]
|
||||||
if prefix:
|
if prefix:
|
||||||
for op in util.get_list(prefix):
|
for op in util.get_list(prefix):
|
||||||
if variables[name_var].startswith(f"{op} "):
|
if not sort_name and variables[name_var].startswith(f"{op} "):
|
||||||
sort_name = f"{variables[name_var][len(op):].strip()}, {op}"
|
sort_name = f"{variables[name_var][len(op):].strip()}, {op}"
|
||||||
if variables["mapping_name"].startswith(f"{op} "):
|
if not sort_mapping and variables["mapping_name"].startswith(f"{op} "):
|
||||||
sort_mapping = f"{variables['mapping_name'][len(op):].strip()}, {op}"
|
sort_mapping = f"{variables['mapping_name'][len(op):].strip()}, {op}"
|
||||||
break if sort_name and sort_mapping
|
break if sort_name and sort_mapping
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue