From cdebcc59e27d7d829874d608b7afcb5f958a21e3 Mon Sep 17 00:00:00 2001 From: ouenascender <138104265+ouenascender@users.noreply.github.com> Date: Wed, 4 Feb 2026 01:46:25 +0000 Subject: [PATCH 1/2] Add Fragment for find_image --- .../stashdb-performer-gallery.py | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/plugins/stashdb-performer-gallery/stashdb-performer-gallery.py b/plugins/stashdb-performer-gallery/stashdb-performer-gallery.py index f030fb7f..e103786e 100644 --- a/plugins/stashdb-performer-gallery/stashdb-performer-gallery.py +++ b/plugins/stashdb-performer-gallery/stashdb-performer-gallery.py @@ -15,6 +15,34 @@ stash_boxes = {} scrapers = {} +FRAGMENT_IMAGE = """ + id + title + visual_files { + ... on ImageFile { + id + path + } + ... on VideoFile { + id + path + } + } + paths { + image + thumbnail + } + galleries { + id + } + tags { + id + } + performers { + id + } +""" + def processImages(img): log.debug("image: %s" % (img,)) @@ -458,13 +486,13 @@ def relink_images(performer_id=None): elif "hookContext" in json_input["args"]: id = json_input["args"]["hookContext"]["id"] if json_input["args"]["hookContext"]["type"] == "Image.Create.Post": - img = stash.find_image(image_in=id) + img = stash.find_image(image_in=id, fragment=FRAGMENT_IMAGE) processImages(img) if json_input["args"]["hookContext"]["type"] == "Image.Update.Post": - img = stash.find_image(image_in=id) + img = stash.find_image(image_in=id, fragment=FRAGMENT_IMAGE) if tag_performer_image in [x["id"] for x in img["tags"]]: setPerformerPicture(img) if json_input["args"]["hookContext"]["type"] == "Performer.Update.Post": stash.run_plugin_task( "stashdb-performer-gallery", "Process Performers", args={"performer": id} - ) + ) \ No newline at end of file From 44f0fd34d7d6bc5eabbd45417bc765fa28124bd4 Mon Sep 17 00:00:00 2001 From: ouenascender <138104265+ouenascender@users.noreply.github.com> Date: Wed, 4 Feb 2026 09:35:12 +0000 Subject: [PATCH 2/2] bump stashdb-performer-gallery version --- plugins/stashdb-performer-gallery/stashdb-performer-gallery.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/stashdb-performer-gallery/stashdb-performer-gallery.yml b/plugins/stashdb-performer-gallery/stashdb-performer-gallery.yml index 6ff4ff26..0a96728e 100644 --- a/plugins/stashdb-performer-gallery/stashdb-performer-gallery.yml +++ b/plugins/stashdb-performer-gallery/stashdb-performer-gallery.yml @@ -1,6 +1,6 @@ name: stashdb performer gallery description: Automatically download performer images from stashdb or other stash-boxes. Add the [Stashbox Performer Gallery] tag to a performer and it will create a gallery of images from that stash-box database. Apply the tag [Set Profile Image] to an image to set it as the profile image of that performer. Note you will need to configure the download path and add this as a path under settings > library -version: 0.2 +version: 0.3 url: https://discourse.stashapp.cc/t/stashdb-performer-gallery/1411 exec: - python