Using arguments for entity slug and studio ID in StashDB import tool.
This commit is contained in:
parent
272a57de58
commit
5515c969de
|
|
@ -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,
|
||||
},
|
||||
}, {
|
||||
|
|
|
|||
Loading…
Reference in New Issue