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

@@ -65,6 +65,18 @@ func ToBasicJSON(reader models.SceneReader, scene *models.Scene) (*jsonschema.Sc
newSceneJSON.Cover = utils.GetBase64StringFromData(cover)
}
stashIDs, _ := reader.GetStashIDs(scene.ID)
var ret []models.StashID
for _, stashID := range stashIDs {
newJoin := models.StashID{
StashID: stashID.StashID,
Endpoint: stashID.Endpoint,
}
ret = append(ret, newJoin)
}
newSceneJSON.StashIDs = ret
return &newSceneJSON, nil
}