Add Studio to movie and fix movie schema (#458)

* Add movie migration
* Update server and UI code for type changes
* Add studio to movies
* Movie blobs to end
* Document movie duration
* Add filtering on movie studio
This commit is contained in:
WithoutPants
2020-04-22 11:22:14 +10:00
committed by GitHub
parent f21e04dcbc
commit eee7adfb85
30 changed files with 531 additions and 144 deletions

View File

@@ -119,10 +119,17 @@ func (r *sceneResolver) Movies(ctx context.Context, obj *models.Scene) ([]*model
}
sceneIdx := sm.SceneIndex
ret = append(ret, &models.SceneMovie{
Movie: movie,
SceneIndex: &sceneIdx,
})
sceneMovie := &models.SceneMovie{
Movie: movie,
}
if sceneIdx.Valid {
var idx int
idx = int(sceneIdx.Int64)
sceneMovie.SceneIndex = &idx
}
ret = append(ret, sceneMovie)
}
return ret, nil
}