From ffaca69c34dca6635aad119dd62d5d969f4ae0f9 Mon Sep 17 00:00:00 2001 From: Harlan Lieberman-Berg Date: Sun, 29 Oct 2023 18:29:40 -0400 Subject: [PATCH] OD-1727: Allow for spaces in tag lists after commas --- efiction/metadata.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/efiction/metadata.py b/efiction/metadata.py index 0c52dfb..7b323d5 100644 --- a/efiction/metadata.py +++ b/efiction/metadata.py @@ -129,12 +129,12 @@ def _convert_story_tag_table(self, table_name, old_tags): def _convert_story_tags(self, old_story): old_tags = { - 'rating': key_find('rid', old_story, '').split(','), - 'categories': key_find('catid', old_story, '').split(','), - 'warnings': key_find('wid', old_story, '').split(','), - 'classes': key_find('classes', old_story, '').split(','), - 'genres': key_find('gid', old_story, '').split(','), - 'characters': key_find('charid', old_story, '').split(',') + 'rating': [t.strip() for t in key_find('rid', old_story, '').split(',')], + 'categories': [t.strip() for t in key_find('catid', old_story, '').split(',')], + 'warnings': [t.strip() for t in key_find('wid', old_story, '').split(',')], + 'classes': [t.strip() for t in key_find('classes', old_story, '').split(',')], + 'genres': [t.strip() for t in key_find('gid', old_story, '').split(',')], + 'characters': [t.strip() for t in key_find('charid', old_story, '').split(',')], } new_tags = {}