From 810b9db274261f52cb0416ae909b5d409e63b41d Mon Sep 17 00:00:00 2001 From: Tweeticoats <60335703+Tweeticoats@users.noreply.github.com> Date: Fri, 19 Jan 2024 21:42:31 +1030 Subject: [PATCH] Update miscTags.py Fix bug if vr tag has not been configured --- plugins/miscTags/miscTags.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/miscTags/miscTags.py b/plugins/miscTags/miscTags.py index 3f47cf50..4bea8eff 100644 --- a/plugins/miscTags/miscTags.py +++ b/plugins/miscTags/miscTags.py @@ -93,11 +93,15 @@ def processVRTags(scene,tags): found=True if found: if 'vrTag' in stash.get_configuration()['ui']: - vr_tag=stash.get_configuration()['ui']['vrTag'] - if vr_tag: - tags.append(vr_tag) - else: - tags.append('VR') + if 'vrTag' in stash.get_configuration()['ui']: + vr_tag=stash.get_configuration()['ui']['vrTag'] + if vr_tag: + tags.append(vr_tag) + else: + tags.append('VR') + else: + tags.append('VR') + else: tags.append('VR') return None @@ -142,8 +146,6 @@ def processScenes(): PLUGIN_ARGS = json_input['args']["mode"] if 'processScenes' in PLUGIN_ARGS: processScenes() - elif 'test' in PLUGIN_ARGS: - log.debug(stash.get_configuration()['ui']['vrTag']) @@ -151,4 +153,4 @@ def processScenes(): id=json_input['args']['hookContext']['id'] if json_input['args']['hookContext']['type']=='Scene.Update.Post': scene=stash.find_scene(id) - processScene(scene) \ No newline at end of file + processScene(scene)