mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Add phash generation and dupe checking (#1158)
This commit is contained in:
@@ -73,6 +73,11 @@ func (i *Importer) sceneJSONToScene(sceneJSON jsonschema.Scene) models.Scene {
|
||||
Path: i.Path,
|
||||
}
|
||||
|
||||
if sceneJSON.Phash != "" {
|
||||
hash, err := strconv.ParseUint(sceneJSON.Phash, 16, 64)
|
||||
newScene.Phash = sql.NullInt64{Int64: int64(hash), Valid: err == nil}
|
||||
}
|
||||
|
||||
if sceneJSON.Title != "" {
|
||||
newScene.Title = sql.NullString{String: sceneJSON.Title, Valid: true}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user