feed: add description to feed items

Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
HeshamTB 2024-08-09 16:30:44 +03:00
parent 6a93d50699
commit 5893b27e60
Signed by: Hesham
GPG Key ID: 74876157D199B09E

View File

@ -80,6 +80,9 @@ func convertFeedToRSS(w io.Writer, feed gofeed.Feed, meta RSSMetadata) error {
gg := g[len(g)-1] gg := g[len(g)-1]
thumb := gg.Children["thumbnail"][0] thumb := gg.Children["thumbnail"][0]
de := gg.Children["description"]
desc := de[0].Value
coverArtUrl, err := url.Parse(thumb.Attrs["url"]) coverArtUrl, err := url.Parse(thumb.Attrs["url"])
if err != nil { if err != nil {
return errors.Join(err, errors.New( return errors.Join(err, errors.New(
@ -101,7 +104,7 @@ func convertFeedToRSS(w io.Writer, feed gofeed.Feed, meta RSSMetadata) error {
Id: id, Id: id,
Duration: "0", Duration: "0",
PublishDateRfcEmail: item.PublishedParsed.Format(time.RFC1123Z), PublishDateRfcEmail: item.PublishedParsed.Format(time.RFC1123Z),
Description: "TBI", Description: desc,
Length: 0, Length: 0,
EnclosureURL: bounceURL.String(), EnclosureURL: bounceURL.String(),
}) })