mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Images section (#813)
* Add new configuration options * Refactor scan/clean * Schema changes * Add details to galleries * Remove redundant code * Refine thumbnail generation * Gallery overhaul * Don't allow modifying zip gallery images * Show gallery card overlays * Hide zoom slider when not in grid mode
This commit is contained in:
@@ -104,6 +104,24 @@ func (qb *PerformerQueryBuilder) FindBySceneID(sceneID int, tx *sqlx.Tx) ([]*Per
|
||||
return qb.queryPerformers(query, args, tx)
|
||||
}
|
||||
|
||||
func (qb *PerformerQueryBuilder) FindByImageID(imageID int, tx *sqlx.Tx) ([]*Performer, error) {
|
||||
query := selectAll("performers") + `
|
||||
LEFT JOIN performers_images as images_join on images_join.performer_id = performers.id
|
||||
WHERE images_join.image_id = ?
|
||||
`
|
||||
args := []interface{}{imageID}
|
||||
return qb.queryPerformers(query, args, tx)
|
||||
}
|
||||
|
||||
func (qb *PerformerQueryBuilder) FindByGalleryID(galleryID int, tx *sqlx.Tx) ([]*Performer, error) {
|
||||
query := selectAll("performers") + `
|
||||
LEFT JOIN performers_galleries as galleries_join on galleries_join.performer_id = performers.id
|
||||
WHERE galleries_join.gallery_id = ?
|
||||
`
|
||||
args := []interface{}{galleryID}
|
||||
return qb.queryPerformers(query, args, tx)
|
||||
}
|
||||
|
||||
func (qb *PerformerQueryBuilder) FindNameBySceneID(sceneID int, tx *sqlx.Tx) ([]*Performer, error) {
|
||||
query := `
|
||||
SELECT performers.name FROM performers
|
||||
|
||||
Reference in New Issue
Block a user