From 062394c6d347ed0fdb0570cdcf82f57b4f27c24f Mon Sep 17 00:00:00 2001 From: AevumDecessus Date: Sun, 29 May 2022 18:46:20 -0400 Subject: [PATCH] Only split move_prefix if there is a space after Fixes issues where a move_prefix of "A" turns "Avengers" into "vengers, A" Also fixes issue where the sort_title includes a preceding space "The Fast and the Furious"->" Fast and the Furious, The" --- modules/meta.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/meta.py b/modules/meta.py index fe6c2f1c..43a86451 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -184,8 +184,8 @@ class DataFile: prefix = template["move_collection_prefix"] if prefix: for op in util.get_list(prefix): - if variables[name_var].startswith(op): - sort_name = f"{variables[name_var][len(op):]}, {op}" + if variables[name_var].startswith(f"{op} "): + sort_name = f"{variables[name_var][len(op):].lstrip()}, {op}" break else: raise Failed(f"{self.data_type} Error: template sub-attribute move_prefix is blank")