mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Resolve performer/studio stashIDs for scraped scenes (#2006)
* Resolve performer/studio stashIDs for scraped scenes * Check endpoint when matching stashids
This commit is contained in:
@@ -610,6 +610,16 @@ func (qb *performerQueryBuilder) UpdateStashIDs(performerID int, stashIDs []mode
|
||||
return qb.stashIDRepository().replace(performerID, stashIDs)
|
||||
}
|
||||
|
||||
func (qb *performerQueryBuilder) FindByStashID(stashID models.StashID) ([]*models.Performer, error) {
|
||||
query := selectAll("performers") + `
|
||||
LEFT JOIN performer_stash_ids on performer_stash_ids.performer_id = performers.id
|
||||
WHERE performer_stash_ids.stash_id = ?
|
||||
AND performer_stash_ids.endpoint = ?
|
||||
`
|
||||
args := []interface{}{stashID.StashID, stashID.Endpoint}
|
||||
return qb.queryPerformers(query, args)
|
||||
}
|
||||
|
||||
func (qb *performerQueryBuilder) FindByStashIDStatus(hasStashID bool, stashboxEndpoint string) ([]*models.Performer, error) {
|
||||
query := selectAll("performers") + `
|
||||
LEFT JOIN performer_stash_ids on performer_stash_ids.performer_id = performers.id
|
||||
|
||||
Reference in New Issue
Block a user