@@ -30,17 +30,18 @@ var feedEntryTmpl = template.Must(
3030 Parse (feedEntryTmplStr ))
3131
3232type feedEntryData struct {
33- CoverURL string `json:"cover_url,omitempty"`
34- Name string `json:"name"`
35- DateLine string `json:"date_line"`
36- TimeLine string `json:"time_line"`
37- Location string `json:"location,omitempty"`
38- FullAddress string `json:"full_address,omitempty"`
39- Hosts string `json:"hosts,omitempty"`
40- Admission string `json:"admission,omitempty"`
41- Description string `json:"description,omitempty"`
42- Link string `json:"link"`
43- MapURL string `json:"map_url,omitempty"`
33+ CoverURL string `json:"cover_url,omitempty"`
34+ CoverURLPreview string `json:"-"`
35+ Name string `json:"name"`
36+ DateLine string `json:"date_line"`
37+ TimeLine string `json:"time_line"`
38+ Location string `json:"location,omitempty"`
39+ FullAddress string `json:"full_address,omitempty"`
40+ Hosts string `json:"hosts,omitempty"`
41+ Admission string `json:"admission,omitempty"`
42+ Description string `json:"description,omitempty"`
43+ Link string `json:"link"`
44+ MapURL string `json:"map_url,omitempty"`
4445}
4546
4647func caTime (s string ) string {
@@ -494,7 +495,8 @@ func EventsFeedHandler(w http.ResponseWriter, r *http.Request, apiBase string, e
494495 data := buildEntryData (item , descriptions [i ], lumaBase , mapBase )
495496
496497 if data .CoverURL != "" {
497- data .CoverURL = apiURL + "/image?" + url.Values {"url" : {data .CoverURL }}.Encode ()
498+ data .CoverURLPreview = apiURL + "/image?" + url.Values {"url" : {data .CoverURL }, "size" : {"md" }}.Encode ()
499+ data .CoverURL = apiURL + "/image?" + url.Values {"url" : {data .CoverURL }, "size" : {"lg" }}.Encode ()
498500 }
499501
500502 published := now
@@ -522,9 +524,9 @@ func EventsFeedHandler(w http.ResponseWriter, r *http.Request, apiBase string, e
522524 Content : buf .String (),
523525 }
524526
525- if data .CoverURL != "" {
527+ if data .CoverURLPreview != "" {
526528 feedItem .Enclosure = & feeds.Enclosure {
527- Url : data .CoverURL ,
529+ Url : data .CoverURLPreview ,
528530 }
529531 }
530532
0 commit comments