feat: save BlurHash from unsplash when selecting a photo from unsplash
This commit is contained in:
parent
f83b09af59
commit
2ec7d7a8a8
1 changed files with 2 additions and 1 deletions
|
@ -61,6 +61,7 @@ type Photo struct {
|
||||||
Height int `json:"height"`
|
Height int `json:"height"`
|
||||||
Color string `json:"color"`
|
Color string `json:"color"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
|
BlurHash string `json:"blur_hash"`
|
||||||
User struct {
|
User struct {
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
@ -315,7 +316,7 @@ func (p *Provider) Set(s *xorm.Session, image *background.Image, list *models.Li
|
||||||
list.BackgroundInformation = unsplashPhoto
|
list.BackgroundInformation = unsplashPhoto
|
||||||
|
|
||||||
// Set it as the list background
|
// Set it as the list background
|
||||||
return models.SetListBackground(s, list.ID, file)
|
return models.SetListBackground(s, list.ID, file, photo.BlurHash)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pingback pings the unsplash api if an unsplash photo has been accessed.
|
// Pingback pings the unsplash api if an unsplash photo has been accessed.
|
||||||
|
|
Loading…
Reference in a new issue