From 5515c969deef688236ad8238ae33e8b48327c2b9 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Tue, 27 Jan 2026 03:34:42 +0100 Subject: [PATCH] Using arguments for entity slug and studio ID in StashDB import tool. --- src/tools/stashdb-hashes.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tools/stashdb-hashes.js b/src/tools/stashdb-hashes.js index 4c3d1a1f..1e4dd321 100644 --- a/src/tools/stashdb-hashes.js +++ b/src/tools/stashdb-hashes.js @@ -88,7 +88,13 @@ async function curateData(data) { .select('releases.*') .leftJoin('entities', 'entities.id', 'releases.entity_id') .leftJoin('entities as parents', 'parents.id', 'entities.parent_id') - .where('entities.slug', 'hardx') + .modify((builder) => { + if (args.channel.charAt(0) === '_') { + builder.where('parents.slug', args.entity.slice(1)); + } else { + builder.where('entities.slug', args.entity); + } + }) .whereIn('entry_id', stashScenes.map((scene) => scene.entryId || scene.urlId)); console.log(`Matched ${sceneEntries.length} scenes`); @@ -132,7 +138,7 @@ async function init() { query, variables: { limit: 1000, - studioId: '8c7ad24a-4756-4163-b328-28e8391602cd', + studioId: args.studioId, page: 1, }, }, {