mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Move image blobs into separate tables (#618)
* Scene cover fallback to database * Fix panic if studio not found * Fix movie studio not being imported/exported
This commit is contained in:
@@ -338,9 +338,8 @@ func createMovies(tx *sqlx.Tx, n int, o int) error {
|
||||
|
||||
name = getMovieStringValue(index, name)
|
||||
movie := models.Movie{
|
||||
Name: sql.NullString{String: name, Valid: true},
|
||||
FrontImage: []byte(models.DefaultMovieImage),
|
||||
Checksum: utils.MD5FromString(name),
|
||||
Name: sql.NullString{String: name, Valid: true},
|
||||
Checksum: utils.MD5FromString(name),
|
||||
}
|
||||
|
||||
created, err := mqb.Create(movie, tx)
|
||||
@@ -385,8 +384,6 @@ func createPerformers(tx *sqlx.Tx, n int, o int) error {
|
||||
performer := models.Performer{
|
||||
Name: sql.NullString{String: getPerformerStringValue(index, name), Valid: true},
|
||||
Checksum: getPerformerStringValue(i, checksumField),
|
||||
// just use movie image
|
||||
Image: []byte(models.DefaultMovieImage),
|
||||
Favorite: sql.NullBool{Bool: getPerformerBoolValue(i), Valid: true},
|
||||
}
|
||||
|
||||
@@ -450,7 +447,6 @@ func createStudio(tx *sqlx.Tx, name string, parentID *int64) (*models.Studio, er
|
||||
sqb := models.NewStudioQueryBuilder()
|
||||
studio := models.Studio{
|
||||
Name: sql.NullString{String: name, Valid: true},
|
||||
Image: []byte(models.DefaultStudioImage),
|
||||
Checksum: utils.MD5FromString(name),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user