Add stash_ids to performer, scene, studio import/export (#1916)

* add stash_ids to performer, scene, studio import/export
This commit is contained in:
7dJx1qP
2021-10-28 20:12:39 -04:00
committed by GitHub
parent 87036a07bc
commit c6a326ca64
13 changed files with 156 additions and 55 deletions

View File

@@ -91,6 +91,18 @@ func ToJSON(reader models.PerformerReader, performer *models.Performer) (*jsonsc
newPerformerJSON.Image = utils.GetBase64StringFromData(image)
}
stashIDs, _ := reader.GetStashIDs(performer.ID)
var ret []models.StashID
for _, stashID := range stashIDs {
newJoin := models.StashID{
StashID: stashID.StashID,
Endpoint: stashID.Endpoint,
}
ret = append(ret, newJoin)
}
newPerformerJSON.StashIDs = ret
return &newPerformerJSON, nil
}