From 6bb7858b28c49acc51b819b00c39cd0f4813e2ac Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Sat, 24 Jan 2026 01:23:37 -0500 Subject: [PATCH] fix: handle missing studio in FormattedTitle Fixes #29 When a scene has no studio set in Stash (studio: null), the FormattedTitle function would crash with TypeError when trying to access data['studio']['name']. Added null check to gracefully handle scenes without studios - the {studio} placeholder will simply be empty in the formatted title. --- Contents/Code/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index 756eba8..8cc82a9 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -120,7 +120,7 @@ def remove_prefix(text, prefix): title = remove_prefix(title, performer) title = remove_prefix(title, " - ") title = title.strip() - if "studio" in title_format: + if "studio" in title_format and data.get('studio'): studio = data['studio']['name'] if "filename" in title_format: