mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Show gallery cover on the edit panel (#5935)
This commit is contained in:
@@ -9,12 +9,14 @@ import (
|
||||
type GalleryURLBuilder struct {
|
||||
BaseURL string
|
||||
GalleryID string
|
||||
UpdatedAt string
|
||||
}
|
||||
|
||||
func NewGalleryURLBuilder(baseURL string, gallery *models.Gallery) GalleryURLBuilder {
|
||||
return GalleryURLBuilder{
|
||||
BaseURL: baseURL,
|
||||
GalleryID: strconv.Itoa(gallery.ID),
|
||||
UpdatedAt: strconv.FormatInt(gallery.UpdatedAt.Unix(), 10),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,5 +25,5 @@ func (b GalleryURLBuilder) GetPreviewURL() string {
|
||||
}
|
||||
|
||||
func (b GalleryURLBuilder) GetCoverURL() string {
|
||||
return b.BaseURL + "/gallery/" + b.GalleryID + "/cover"
|
||||
return b.BaseURL + "/gallery/" + b.GalleryID + "/cover?t=" + b.UpdatedAt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user