Stash-box tagger integration (#454)

This commit is contained in:
InfiniteTF
2020-10-24 05:31:39 +02:00
committed by GitHub
parent 70f73ecf4a
commit 3346f8dcca
75 changed files with 3007 additions and 79 deletions

View File

@@ -404,6 +404,14 @@ func (qb *SceneQueryBuilder) Query(sceneFilter *SceneFilterType, findFilter *Fin
query.addHaving(havingClause)
}
if stashIDFilter := sceneFilter.StashID; stashIDFilter != nil {
query.body += `
JOIN scene_stash_ids on scene_stash_ids.scene_id = scenes.id
`
query.addWhere("scene_stash_ids.stash_id = ?")
query.addArg(stashIDFilter)
}
query.sortAndPagination = qb.getSceneSort(findFilter) + getPagination(findFilter)
idsResult, countResult := query.executeFind()