mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Show studio as text in scene cards where studio image isn't set (#965)
This commit is contained in:
@@ -26,10 +26,14 @@ func (rs studioRoutes) Routes() chi.Router {
|
||||
func (rs studioRoutes) Image(w http.ResponseWriter, r *http.Request) {
|
||||
studio := r.Context().Value(studioKey).(*models.Studio)
|
||||
qb := models.NewStudioQueryBuilder()
|
||||
image, _ := qb.GetStudioImage(studio.ID, nil)
|
||||
|
||||
var image []byte
|
||||
defaultParam := r.URL.Query().Get("default")
|
||||
if len(image) == 0 || defaultParam == "true" {
|
||||
|
||||
if defaultParam != "true" {
|
||||
image, _ = qb.GetStudioImage(studio.ID, nil)
|
||||
}
|
||||
|
||||
if len(image) == 0 {
|
||||
_, image, _ = utils.ProcessBase64Image(models.DefaultStudioImage)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user